openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JayaPrakash <jponthe...@sify.com>
Subject Re: Bidirectional relation problem using web service (Cycle exception)
Date Mon, 01 Mar 2010 21:43:52 GMT

Hi,

   We had a similar issue, what we have done is.....
For a given example A, B and C objects, for bidirectional relationship, we
set Object B inside A and A back to B to support the bidirectional
relationship. Since this becomes a cycle you end up getting that error. 

To avoid that, all we did was on the WebService side we make sure we only
Set the children inside the parent object and clear (by setting it to null)
the Parent property inside the child. Again in the DAO layer before
inserting/updating we take care of setting the Parent back into its children
to suit the bidirectional relationship.

Hope this helps.
-- 
View this message in context: http://n2.nabble.com/Bidirectional-relation-problem-using-web-service-Cycle-exception-tp4569711p4657199.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message