Re: Questions to new WonderEntity templates

From: David Holt (programmingos..ac.com)
Date: Wed Aug 25 2010 - 22:22:29 UTC

  • Next message: David Avendasora: "Re: [OS-JIRA] Created: (WOL-1170) [PATCH] ERModernD2W Project Template"

    Hi Ramsey,

    Now I have the opposite problem. I must have been using this version of WOLips that had the clazz templates in it. I used some clazz methods, and now, after updating my model today it overwrote the clazz stuff in my super classes. Do you have those templates you committed available somewhere so I can copy them into my project? Thanks very much,

    David

    On 2010-07-02, at 7:51 AM, Ramsey Gurley wrote:

    >
    > On Jul 2, 2010, at 10:20 AM, David Avendasora wrote:
    >
    >>
    >> On Jul 2, 2010, at 9:02 AM, Ramsey Lee Gurley wrote:
    >>
    >>>
    >>> On Jul 2, 2010, at 7:01 AM, David Avendasora wrote:
    >>>
    >>>> It appears that this change is also breaking existing Wonder Frameworks and Apps that have models and generated EOs such as ERAttachment and ERModernMoviesDemo:
    >>>>
    >>>> _ERDatabaseAttachment.java has this:
    >>>>
    >>>> public static class _ERDatabaseAttachmentClazz extends ERAttachment.ERAttachmentClazz {
    >>>> /* more clazz methods here */
    >>>> }
    >>>>
    >>>> ERAttachment.java has no ERAttachmentClazz class in it since it is an existing class and EOGenerator doesn't touch it.
    >>>>
    >>>> _ERAttachment.java has this:
    >>>>
    >>>> public static class _ERAttachmentClazz extends ERXGenericRecord.ERXGenericRecordClazz<ERAttachment> {
    >>>> /* more clazz methods here */
    >>>> }
    >>>
    >>>
    >>> True, since the Entity.java are never regenerated, those would need to be added manually or the subclasses will be pointing at a non-existant class for super.
    >>>
    >>> If that's a huge problem, I can create a patch to pull the clazz stuff back out. WOL-1125 started as a simple little patch to change inline strings to static strings, so if this is really problematic, I'm not insistent that these stay. But if everyone likes the clazz stuff, I can create a patch to add those too. Either is fine with me
    >>
    >> Well, at the very least the rest of Wonder should be made not to break if the base templates change. But besides that, there's lots of people out there that just use the default Wonder templates and this change will break all their frameworks and/or applications. I don't think that is acceptable.
    >>
    >> Don't get me wrong, I _love_ updates and improvements. We just can't break existing code without a really, really good reason.
    >>
    >> Dave
    >
    > I agree too. To be frank, the clazz stuff sorta slipped in accidently. I use these things personally. The first patch I started with fresh/existing templates. They were fine. Then I noticed the patches (and existing templates) didn't work when generating _entity classes in a separate package ( a very helpful feature in its own right), so I updated the templates I was using to fix that and resubmitted. I sorta realized the goof, because I later noticed my ERXLangauges stuff made it in, but that shouldn't cause any problems. Only after it was patched in did I realize the clazz stuff was in there too.
    >
    > That said, the clazz stuff is a pretty nice feature and it cannot be included without updating (breaking) existing entity templates. I was sorta hoping you guys would just LOVE the idea (^_^) Sadly, since I don't hear anyone shouting "Hooray!" I guess that makes it too radical of a change to include. I'll create a new set of templates based on the original submission that fixes the generated package issue and resubmit it asap.
    >
    > Sorry I caused so much grief for everyone,
    >
    > Ramsey
    >



    This archive was generated by hypermail 2.0.0 : Wed Aug 25 2010 - 22:23:10 UTC