Remove arbitrary reverse relationship mapping limitations
----------------------------------------------------------
Key: CAY-843
URL: https://issues.apache.org/cayenne/browse/CAY-843
Project: Cayenne
Issue Type: Improvement
Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Andrus Adamchik
Assignee: Andrus Adamchik
Fix For: 3.0
From the mailing list post:
Remove
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.
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Mon Aug 06 2007 - 11:33:14 EDT