On 01/06/2007, at 7:32 PM, Andrus Adamchik wrote:
> With this in mind we do not need an inheritance ObjRelationship,
> but we may use a DbRelationship to store join semantics (anybody
> mentioned that already??).
Well the original suggestion I made was for <obj-entity
superRelationship="nameOfRelationship" ...> to allow for specifically
specifying vertical inheritance (which would have the effect of not
listing this relationship along with those returned from
objEntity.getRelationships() but via objEntity.getSuperRelationship().
Are you suggesting that you'd prefer <db-entity
superRelationship="nameOfRelationship" ...> or just figuring out the
relationship by finding the one that happens to map to the parent as
a toOne?
The nice thing I thought about having a superRelationship definition
in the modeler is that you can then make your inheritance choice in
one place and it's clear of the choice. i.e., the above would just
require an additional popup next to the popup for which DbEntity an
ObjEntity maps to to choose a relationship. Otherwise perhaps it
wouldn't be as clear whether such a relationship exists.
The other option I considered initially was having superRelationship
as a boolean flag with validation to ensure there was an accompanying
relationship called 'super' but thought this unnecessarily
restrictive in the end.
> Another nice side effect of it is that such relationship is not a
> part of the object model (ObjRelationship would've been an object
> property). So there is nothing artificial about such mapping, and
> no new concepts are needed in Cayenne to map it.
Can you clarify this a bit more.
Thanks.
with regards,
--Lachlan Deck
This archive was generated by hypermail 2.0.0 : Fri Jun 01 2007 - 08:28:55 EDT