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: HQL creates partial object graphs.
PostPosted: Wed Aug 24, 2011 2:36 pm 
Newbie

Joined: Fri Jun 10, 2005 12:09 pm
Posts: 11
Let say that I have policies and policies have multiple addresses. I want to do a search an find all policies that have at one of the addresses in Iowa. My HQL would be

from policy p
left join fetch address a
where a.state = 'IOWA'

But that returns a policy with the address collection containing only the IOWA addresses.

I could grab the policy id and make another call to get the policy but the cache will return the one I just got.

How can I search by address but get the WHOLE object graph back?


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.