-->
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: lazy loading And bag problem
PostPosted: Thu Jul 27, 2006 11:57 am 
Newbie

Joined: Tue Nov 29, 2005 11:23 am
Posts: 3
Hibernate version:3.1.3


<bag name="thingy" table="obj_with_thingy" lazy="true">
<!--
<cache usage="nonstrict-read-write"/>
-->
<key column="DOM_ID" />
<one-to-many
class="com.comp.objsInThingy" />
</bag>





remove all call procedure to reduce to only hibernate calls

hivetranse
Object o = _session.get(Thingy.class, thingyId);
hivetranse

hivetranse
Collection objs = ((Thingy) o).getObjs();
// failure append here
objs.iterator;

hivetranse





failed to lazily initialize a collection of role: com.comp.Thingy.objs, no session or session was closed



The session used is the same - hivetranse does not affect session or transaction.
the transaction does not seam to be closed.


then why do I need a merge to execute this.
(or disable the lazy of course)

so strange.

if someone has any idea. tks.


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.