I’m having a Hibernate query problem, basically it goes like this …
I have a User object that has an associated set of Class objects. Class objects have a startDate (a java.util.Date).
In my UI the User has a display only startDate which is the the startDate of the earliest class.
How do I build a Hibernate query that will return a list of Users that have a start date within a range?
Originally I was thinking it would be something like …
"from User u where :beginRange < u.startDate < :endRange"
… but the problem is the u.startDate is not persisted in the database, it’s dynamically determined for presentation only.
Any help or pointers in the right direction are greatly appreciated!
Thanks,
rob
Not tested, but something like this should work :