Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Re: OpenJPA - two-sided relation between objects Issue

Pinaki Poddar

2008-08-12

Replies: Find Java Web Hosting

Author LoginPost Reply

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.
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.