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: getting to an association w/o using lazy=false
PostPosted: Mon Apr 10, 2006 11:30 am 
Regular
Regular

Joined: Mon Jun 13, 2005 12:38 pm
Posts: 56
Location: Austin, TX
Is there a way to get to an association from an hql query? Currently I have lazy set to false. I don't want to have the caller of my dao method responsible for opening a session to get to a reference. How can i make sure the caller will have the reference available without making the association non-lazy. I assume I can write a HQL query to ensure the association is there.


thanks in advance,
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 12:46 pm 
Regular
Regular

Joined: Mon Jun 13, 2005 12:38 pm
Posts: 56
Location: Austin, TX
Looks like I could use a criteria object and specify FetchMode.EAGER or I could use an HQL query with a join and use the Fetch keyword.

http://www.hibernate.org/hib_docs/v3/re ... icfetching


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.