-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Circular Refs in Hibernate VOs blowup XML Serialization
PostPosted: Fri Jul 30, 2004 5:22 pm 
Regular
Regular

Joined: Thu Jul 01, 2004 12:13 am
Posts: 68
Location: San Diego, CA
We are using WebLogic WebServices to transfer our Hibernate VOs over the wire for transferring data. Problem is that in any relationship between two objects created with HibernateSynchronizer, there's a circular reference between those objects. WebLogic's XMLEncoder doesn't like this too much complaining about the recursion. I am wondering what I can do in the Hibernate objects to break the reference.

Right now I am thinking to break the circ. reference by removing the reference to the parent object from the child object. Thus, only allowing navigability from the parent object. Does this make sense to do this or will I break something because Hibernate needs this reference for persistence? The problem is that these references are FKs in the table with NOT NULL set. :(

Your experiences would be appreciated.

TIA,
Lou


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 6:39 pm 
Regular
Regular

Joined: Thu Jul 01, 2004 12:13 am
Posts: 68
Location: San Diego, CA
As suspected the FKs need to be nullable for this to work. I can have the Set on the many side and just remove the many-to-one relationship on the one-side.

Lou


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.