On Friday, November 8, 2002, at 04:32  PM, Bruce Snyder wrote:
This one time, at band camp, Charles Forsythe said:

CF>Bruce Snyder wrote:
CF>
CF>>Officially, Castor only support bi-directional relationships
[snip]
CF>
CF>You've mentioned this several times. Can we get some documentation on
CF>the details of this? Or should we just assume that any violations of
CF>this may result in failures in a future release of JDO?

Charles,

I'm honestly not quite sure why this isn't enforced everywhere. I've
never tried to chase it and figure it out. Does anyone else have any
input on this subject?
Hi,

Since you asked for input:

For some relationships between objects, a bidirectional relationship is overkill. For instance, in a 'depends' mapping there is no need for the dependent object to carry a reference to its parent -- it can never be loaded, updated, deleted, etc., without its parent, so there is no need for it to keep separate track of it. I was pleased to discover that this is one case where castor does not require a bidirectional relationship, and I hope it can stay that way.

For independent objects in 1:1 and 1:N relationships, a unidirectional relationship should also suffice. Here, the decision should rest with the end developer -- if the system only needs to perform queries in one direction, the developer should have the option of only maintaining that one relationship. (This is particularly important for 1:N.) I have just begun evaluating castor's behavior in this regard, but it seems to work fine unidirectionally.

In fact, most of the cases I've tried have not required bidirectional relationships. (I have not tried M:N, though, and I can see why it would.) If I've overlooked anything, I'd be pleased to hear about it.

Thanks,
Rhett

=====================================================
| Rhett Sutphin
| Research Assistant (Software)
| Coordinated Laboratory for Computational Genomics
| and the Center for Macular Degeneration
| University of Iowa - Iowa City, IA 52242 - USA
| 4111 MEBRF - email: [EMAIL PROTECTED]
=====================================================

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to