-->
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: Undeterminist cascading save on many-to-many association
PostPosted: Wed Sep 28, 2005 12:00 pm 
Newbie

Joined: Thu Jul 21, 2005 5:37 am
Posts: 9
Location: Paris
Hi,

I have been struggling with this problem long enough to ask for a little help from experts.

I have a really weird behavior but my use case is not that simple, so let me explain.

I have two opened Session on two different database (one is PostgreSQL and the other is HSQL DB) and I try to transfer my persisted objects from PostgreSQL to HSQL.
First, I cannot use the Session.replicate() because I have sequence primary key on my tables. So I have to transfer the objects manually.
Of course, objects are properly evicted before saving them in the other session.

Among the persistent classes in my data model, I have an abstract Document class which has a many-to-many relation with a Segment class.
I also have a ProtectedDocument class which extends Document an is declared persistent.
The ProtectedDocument class has all kinds of association with other classes (one-to-many, many-to-many, many-to-one) , but I only have problems when it comes to transfer the association between Document and Segment.
The link between these two entities is not always recreated, but I don't know why exactly.
The weirdest thing is that the same application code base might produce both results depending on some data which I haven't been able to isolate.

The only thing I could notice is that there is no call to the AbstractCollectionPersister.recreate() method with the Document.segments collection when I experience this bug.

Maybe it could come from a bug on the cascade='save-update' on the many-to-many association ?

Could anybody help me with this ? Any hints ?

I would definitely appreciate some help.

Regards,

Gregory

Hibernate version: 3.0.5


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.