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: how can I import object hierarchy without StaleObjectStateEx
PostPosted: Sat Nov 18, 2006 9:12 am 
Newbie

Joined: Thu Nov 16, 2006 11:19 am
Posts: 3
Hi,

I have serialized my object hierarchy to disk and which to restore the objects, with their original primary keys, back into the database.

Essentially I rebuilt the database and want that set of data back where it was. I dont want to generate new primary keys.

If I save my object with session.save the top/parent object generates an insert but the child it generates an update which fails with

StaleObjectStateException


Any easy way to do this?

thanks


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.