openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: OpenJPA - two-sided relation between objects Issue
Date Tue, 12 Aug 2008 19:37:25 GMT

Hi,
  The mapping you described originally in this post should work as well.
  Of course, the application must set the values of ADDR_FK_ID from both
sides consistently. 
For example, if there is one Address instance A1 with id 12345 and A1.phones
is a Set that contains two Phone instances P1 and P2. Then the application
must ensure that for both P1 and P2 addressId field is set to 12345 before
commit. The problem will be complicated only if Address has auto-generated
identity. 
-- 
View this message in context: http://n2.nabble.com/OpenJPA---two-sided-relation-between-objects-Issue-tp687050p720324.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message