-->
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: One to Many without the One?
PostPosted: Mon Sep 08, 2003 6:45 pm 
Newbie

Joined: Mon Sep 08, 2003 5:47 pm
Posts: 9
Location: Denver
I'd like to be able to fetch a List of Lists.

I've got a one to many OBJECT relationship where only the many side is persistent - so there is no DATABASE relationship.

I know I can do the following:
session.find("from DataRecord as datum where datum.time = 87394875");

and get back a single list of DataRecord instances... but it would be great if I could somehow do something like:
session.find("from DataRecordList as drList where drList.timeKey in (98734987,9834793,9389453)");

and get back a List of Lists of DataRecords.

I may be off my rocker but what I'm trying to do is have one thread fetching data lists and another processing them - I'd like the fetches to produce enough data to keep the processing thread busy while waiting for the next batch from the database.

I am conjecturing that the time required to execute a query returning 100 sets in a result is faster than executing 100 queries. I'm going to test that now.

Advice?

Thanks!
- Chris


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.