-->
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.  [ 1 post ] 
Author Message
 Post subject: Cloning issue
PostPosted: Thu Oct 29, 2009 2:33 pm 
Newbie

Joined: Thu Oct 29, 2009 2:25 pm
Posts: 2
Hi

When i try to save a detached object, i face issue where mappings get lost but if i make a new object from that object and save, then everything works fine.

Details:
I load the object from the DB and now session is closed, i have the detached object and i wanna save a copy of the detached object, so i go ahead and nullify the detached objects and try to save it, so it saves but the many to many mappings are lost but if I make copy of the detached object (detached object - convert to xml using jibx - then again to object using jibx) and save it, it works fine.

Can somebody throw some light?
FYI, I am using annotations, so i cant use the unsaved value option to tell hibernate that it's a new object and save it fresh etc.

Thanks
Pankaj


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

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.