openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger" <>
Subject RE: maintaining bi-directional relationships
Date Wed, 07 May 2008 16:44:21 GMT
Why not use OpenJPA Managed Inverses, ?

-----Original Message-----
From: Adam Hardy [] 
Sent: mercredi, 7. mai 2008 17:51
Subject: maintaining bi-directional relationships

This is a design question really, sorry it's a little OT.

I assume I have responsibility for maintaining parent - child
relationships reflected by the parent.getChildren collection and
child.getParent entity at the point where the change occurs.

Is there a good pattern to implement changes to both the children
collection on the parent and the parent entity on the child?

One approach: setting field-access on the entity mapping, and adding
code to the setters with some sort of mechanism to stop infinite

Thanks in advance


 This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
 Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
 Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
 An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
 If you have received this email in error, please notify the sender immediately
  and delete the original.

View raw message