Re: Missing DbAttribute

From: Mike Kienenberger (mkienen..mail.com)
Date: Thu Jul 27 2006 - 16:01:54 EDT

  • Next message: Mike Kienenberger: "Delete Rules: Cascade with Deny on reverse relationship"

    On 7/27/06, cay dabbler <xsd..uvip.com> wrote:
    > >Ie, Foo2.getFoo1Attribute is generated as
    > >getFoo1().getFoo1Attribute() underneath.
    >
    > Thanks for your reply. I can manage the small incovenience of
    > (re)re-engineering my schema and editing the objects- every time I reload
    > Cayenne. I am, however, too lazy for vertical inheritance: This is how I did
    > my inheritance: excerpt from my *.vm:

    Yes, I wasn't trying to tell you that you should do inheritance
    differently. I was stating that I'm doing it differently and can't
    really help much. I'm not completely certain what you need to do
    differently than is being done in your generated classes, but there's
    probably a way to do it without requiring you to manually edit your
    generated classes.

    > >It's not that straight-forward. Every ObjAttribute has a
    > >DbAttribute, but every DBAttribute can have zero or one or probably
    > >even many matching ObjAttributes.
    >
    > Rather odd, are you saying that a dbAttribute is mapped to zero or more
    > objAttributes, whereas an objAttribute is mapped to one dbAttribute?

    Yes. It's not really that odd. It's simply saying that every java
    property maps to exactly one database field. It's also saying that
    a particular database field may map to no java property, exactly one
    java property (99.999% of the time), or multiple java properties (I've
    never had a use case for this so far, but there's no reason why it
    couldn't happen, I suppose).



    This archive was generated by hypermail 2.0.0 : Thu Jul 27 2006 - 16:02:17 EDT