I'd use the Criteria API to create dynamic queries based on what the user wants to see.
On Wed, May 27, 2009 at 9:02 AM, VolkerR <[email protected]> wrote: > > Hi all, > > i'm currently working on an application that deals with a large amount > of data. One part > of it is to manage all tasks an employee has to do per day. This could > result in between > 50 to 100 task records for every employee per day. So it ended up with > at least 30000 > records per year. So far so good. But if my Employee class has a one- > to-many relation > to the Task class, NH would load all Task records for a concrete > Employee. But > this is n't really necessary. The user decides which tasks he wants to > see, given for example > a specify date range. I surely could apply a filter with "from" - "to" > parameters, but then > i have to enable it with the session. On the other hand, the filter > should be dynamic, so > i dont know, wich conditions a user will apply( fromDate only?, > fromDate an toDate?, fromDate > and fromTime? etc.). > Is there a way to manage this in an elegant way or should i implement > this without the > relation mapping? > > Thanks and regards, > Volker > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
