Re: EntityModeler does not use EOModelGroup.defaultModelGroup() for SQL generation

From: Guido Neitzer (list..vent-s.net)
Date: Wed Jun 27 2007 - 11:27:39 EDT

  • Next message: Peter Witzel: "Unable to install WOLips 4118 (stable)"

    On 26.06.2007, at 23:57, Lachlan Deck wrote:

    > On 27/06/2007, at 3:32 PM, Chuck Hill wrote:
    >
    >> In case this saves anyone some time in the future: if you are
    >> customizing the SQL generation be aware that the model group the
    >> models are loaded into is _not_ EOModelGroup.defaultGroup(). If
    >> you can get a reference to an entity, you can navigate back up to
    >> the group.
    >
    > Can you elaborate on this a bit more?

    If you customize your SQL generation somehow, e.g. by providing a class

    org.objectstyle.wolips.eomodeler.EOModelProcessor

    and hooking into "processModel" or "processSQL" to change the default
    behaviour, you have to be aware, that you don't get the default
    modelGroup. That's the case I'm aware of.

    I customize SQL generation in a way that I can set an attribute to be
    "not null" on a subclass where the superclass does not have that
    attribute or allows null for it. Therefor I have to "catch" the
    generated SQL and remove the "not null" constraint.

    cug



    This archive was generated by hypermail 2.0.0 : Wed Jun 27 2007 - 11:28:51 EDT