-->
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: Loading only subset of collection, how to ?
PostPosted: Thu Jun 24, 2004 7:45 am 
Newbie

Joined: Wed May 05, 2004 9:48 am
Posts: 8
Hi there,

suppose I have object Calendar which contains collection of CalendarItem.
Every CalendarItem is valid at one dat. Possibly the Caledar object have many CalendarItems (lets say 1000+).

Now I'm using commong mapping one-to-many from Calendar to CalendarItem. This works fine.

But the question is, if there is possibility to limit the set of CalendarItems that are loaded by Calendar ? So if user needs to work only on past moth Calendar will load only CalendarItems that fints to the last month.

Because I need to change it in runtime I cannot use the where condition in mapping file right ?

One possibility I think is, that I will not use one-to-many mapping in Calendar class, but there I will manually load the set using HQL but this doesn't seems to be proper solution.

Any hint ?


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.