cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <>
Subject Re: Missing DbAttribute
Date Thu, 27 Jul 2006 20:01:54 GMT
On 7/27/06, cay dabbler <> 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).

View raw message