-->
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: session.replicate()
PostPosted: Wed May 05, 2004 6:56 am 
Newbie

Joined: Wed Sep 17, 2003 8:26 am
Posts: 16
hi all,

i'm trying to gather some more information about session.replicate(). i'm trying to deprecate some old replication stuff i've written in the past and want to replace it with session.replicate().

i use many-to-one mappings quite often. the way i tried to use session.replicate() i either ran into the problem that hibernate told me that the object/collection was already associated with another session (the source session) or the session was closed (trying to lazy-load the collection after i closed the source). i don't need to replicate the collections, only attributes/mapping-id's because the way i prepare the objects that need to be replicated, all the objects from the collections would have been copied before the object that contains the collection. changing lazy-loading to something different also seems not a good way for me as the collections can get quite big and elements in the collection don't change too often. so i guess, i would create too much traffic that way.

is it possible to only replicate a given object and forget about associated objects?

i'm using 2.1.3.
cascade is set to "none" for all mappings.

if you need more info to answer my question pls ask. i read the forum and tried to peek into the source as well. from SessionImpl.doReplicate() i got the impression that if i don't cascade, the above should be possible.

tia jan


Top
 Profile  
 
 Post subject: pls don't bother
PostPosted: Wed May 05, 2004 9:01 am 
Newbie

Joined: Wed Sep 17, 2003 8:26 am
Posts: 16
i had to change my approach so i developed a different solution because of other constrains.

but i would be interested if my first try/probable solution to replicate objects could have worked.

thx,

jan


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.