-->
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.  [ 3 posts ] 
Author Message
 Post subject: @Version and Collection was not processed by flush
PostPosted: Wed Dec 13, 2006 9:00 am 
Newbie

Joined: Fri Oct 27, 2006 8:43 am
Posts: 14
Hello guys,

In our system here, which has several entities and relationships, everything was running fine (unit tests, etc.). We are using the following hibernate versions:

Hibernate Core 3.2.0.cr4
Hibernate Annotations 3.2.0.cr2
Hibernate EntityManager 3.2.0.cr2

We are used annotations for everything, including validation.

We then tried to use Hibernate @Version annotation to control concurrency. Everything was working fine, and right after i insert this annotation in the proper field, many of my unit tests start accusing this error, in unused collections:

org.hibernate.AssertionFailure: collection [...] was not processed by flush()

We are not using any custom listeners. On the internet, i checked that custom listeners may cause this trouble, but in our case we only need to put versioning for it to happen.

Any ideas?

Thanks a lot,
Chicoscience


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 7:26 am 
Newbie

Joined: Fri Oct 27, 2006 8:43 am
Posts: 14
No ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 6:09 am 
Newbie

Joined: Fri Oct 27, 2006 8:43 am
Posts: 14
Update in the information:


I found a way for this error not to happen, but it is not a desirable way:

Entities X and Y have a bidirectional many-to-many relation. If i use @Version, when testing X i get "collection Y.x was not processed by flush()". But if i set the Fetch Type in collection X.y to EAGER, this error does not happen.

Why doesn't it work with lazy? Is it a hibernate bug?

Thanks,
Chicoscience


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.