-->
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: Lazy ignored for HSQL and H2 workaround
PostPosted: Wed Mar 09, 2016 5:47 am 
Newbie

Joined: Sun Feb 28, 2016 3:16 pm
Posts: 17
Hi all!
Sorry for new topic creation, this is because of slightly theme difference .
Does somebody knows workaround for case, when Hibernate returns result with children for lazy=true?
______________________
Hibernate 5.1.0.Final (!)
HSQL 2.3.3

All is in the attached file https://hibernate.atlassian.net/browse/HHH-10604.
Please, run only test.
Code:
return session.createQuery(
                "from Category where categoryParentId = :parentId").setLong("parentId", parentId).list();
//...
<bag name="children" table="Category" inverse="true" lazy="true" fetch="select">
//..
</bag>


Top
 Profile  
 
 Post subject: Re: Lazy ignored for HSQL and H2 workaround
PostPosted: Wed Mar 09, 2016 6:06 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1638
Location: Romania
I tried to replicate this but it works just fine. Why is that you think that LAZY is not working?

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


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.