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: replicate not copying junction tables
PostPosted: Mon Aug 25, 2008 9:24 am 
Newbie

Joined: Thu Jun 19, 2008 4:49 am
Posts: 12
i have two objects a and b. both have a many-to-many relationship and therefore they are connected in a junction table.

when i try to copy the state of a and b from one database to another, i use session.replicate(a) and session.replicate(b). both objects are saved in the database, but the junction table is empty.

any solutions?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 25, 2008 10:32 am 
Newbie

Joined: Thu Jun 19, 2008 4:49 am
Posts: 12
ok this seems to be a problem with lazy loading as i close the first session before i replicate to the second session the related objects haven't been loaded on the first session so no relation is known by hibernate (problem solved?).


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.