-->
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: Empty one-to-many collection before persisting a transaction
PostPosted: Wed Jul 17, 2013 2:44 am 
Newbie

Joined: Wed Jul 14, 2010 3:10 am
Posts: 3
Hello,

I have two objects linked, so A with a one to many collection and in B I have a many to one representing
the A reference.

In the same transaction, I persist a B instance and try in a select request to get my A objects with their
B collections filled.

I have the following query with a simple join
Code:
String query = "from Process as p left join p.operations "; 

I got my A collection but the be collection inside B object is empty.
On the other hand if I commit the transaction between the insertion and the select, everything works fine.
I tried to change transaction isolation properties with read_uncommit but without success.

I just want to know why does this happen ?


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.