-->
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.  [ 4 posts ] 
Author Message
 Post subject: some problem with fetch command
PostPosted: Thu Apr 22, 2004 3:29 am 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
hi

im using some objects with collections

A -> B
A -> C

im using lazy loading on all collection

im using oql to query some A items with constraints on B object and need loading C objects

select a from com.object.a as a inner join com.object.b as b, com.object.a as a2 left join fetch a2.bs where b.field1:=val1 and b.field2:=val2

its works : i could see the select clause in console with A,B and C object

but when im retrieved elements (A object) on the query result and when i get a.bs.iterator(), hibernate execute select command to load B object

what does i mean ?

fetch keyword dont work ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 4:04 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you"re fetching an object that is not returned a2, so I don't think Hibernate will fetch bs for real

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 7:22 am 
Newbie

Joined: Wed Oct 22, 2003 5:33 am
Posts: 10
Location: france
emmanuel wrote:
you"re fetching an object that is not returned a2, so I don't think Hibernate will fetch bs for real


ok emmanuel, thanks for your reply

but have you got a solution ?
what can i do to use constraints on parent and using fetch together ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 4:13 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Actually I don't understand the point of your query (functional meaning).

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.