Joined: Mon Feb 02, 2004 4:18 pm Posts: 16
|
I've got a general question about using HQL. I've got an object called schedule which contains a collection of events. Each event needs to be validated before the schedule can be approved so I have a Boolean flag on the event to determine if it has been passed.
What I need to do is search for the earliest schedule in the database that contains an event that has not been validated, but I can't figure out how to write a query like that! Could anyone point me in (roughly) the right direction on how to write such a query?
The alternative is to search for all schedules and then each event for each schedule and if an event isn't validated then add the schedule to an "incomplete" list and finally sort the list by date. Even writing that down and reading it back feels very wrong and I'm sure I'm missing some elementary database querying skills here :$
|
|