Not only does a class get cluttered with unnecessary used reverse
relationships, but in my own use cases, these relationships are often
to another DataMap, creating complicated and unnecessary data map
dependencies.
On 8/5/07, Malcolm Edgar <malcolm.edga..mail.com> wrote:
> That would be great.
>
> Often object elationships represent ownership, so having the reverse
> relationship exposed doesn't make much sense. Also I often have the
> use case where may classes will have a relationship with a particular
> class, which ends up being cluttered with the reverse relationships.
>
> regards Malcolm Edgar
>
> On 8/5/07, Andrus Adamchik <andru..bjectstyle.org> wrote:
> > We have two rules related to relationship mapping that we can really
> > do well without:
> >
> > 1. A DbRelationship always requires a reverse DbRelationship.
> > 2. A to-many ObjRelationship without a reverse to-one is effectively
> > read only.
> >
> > I've done some work on a project where we've used generic persistent
> > classes, and it occurred to me that while the two things above are
> > indeed a property of Cayenne runtime, users don't have to worry about
> > such low level details. Cayenne can automagically add missing reverse
> > relationships in runtime to the corresponding entities, without user
> > ever noticing. That simple - don't know why nobody thought of that
> > before :-)
> >
> > BTW what makes (2) painless is CayenneDataObject that can store
> > arbitrary data in it, so a back pointer from toOne side to the toMany
> > site can be stored. This won't work in case of POJO's (without extra
> > enhancement), but for normal Cayenne we get that functionality out of
> > the box.
> >
> > Any comments on that?
> >
> > Andrus
> >
> >
> >
> >
> >
>
This archive was generated by hypermail 2.0.0 : Mon Aug 06 2007 - 12:40:23 EDT