-->
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: eager fetch
PostPosted: Tue May 03, 2005 1:03 pm 
Beginner
Beginner

Joined: Mon Jan 24, 2005 6:42 pm
Posts: 26
I have a question regarding loading a graph of objects for return to the client. I have the following object graph

obj A has a 1:1 with obj B
obj A has a 1:n with obj C
obj B has a 1:n with obj D
obj B has a 1:n with obj E
obj B has a m:n with obj F

I need all of the data starting with object A and all of its associated collections. How do I structure a HQL query or a criteria query for this?

I started with:

list = HibernateUtil.getSession()
.createCriteria(A.class)
.add(Expression.between("someDate", date1, date2)

not sure what to put here, if I an reading correctrly I can only retreive 1 m:n collection, what about all the 1:n ones?

.addOrder("someDate")
.list()

Thanks for the help


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.