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 ?
|