-->
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: How to get Object graph with specified criteria
PostPosted: Tue May 25, 2004 6:36 pm 
Beginner
Beginner

Joined: Thu Oct 23, 2003 1:43 pm
Posts: 23
Hi,

May be I'm missing something small but spent almost the whole day to figure out my problem. I have an object graph : Object A contains sets of Object B which inturn contains Object C. I could able to get the whole object graph with some criteria mentioned on the hbm.xml file but now I would like to get the object graph based on some conditions in Object B.


Here is my query:

select * from A,B,C where A.id = B.foreign_id and B.id = C.foreign_id and B.name = 'blah' and A. date>= Sysdate.

When i do the above query using sess.find(), I'm not getting Object A contains Object B contains Object C but rather the first element in the list Object A, the second element in the list is Object B and third is Object C.

Please let me know if I'm doing anything wrong. I'm using Hibernate 2.0 with Oracle

Thanks
Raghu


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.