Joined: Tue Jul 27, 2010 3:34 pm Posts: 1
|
I am using Hibernate 3 with a MySQL database and the current version of Java. I am currently implementing a search for dates and date ranges. My current table is very simple and contains a startDate and an endDate field. I am using a value of null in end date to signify the "present" or current date. Using HQL or the Criteria API is there a way for me to formulate my queries such that when searching against a row where the endDate is null that the current system date is used? I have looked into using a case..when...then...else...end type of statement, but there aren't any solid examples of how to use it. Any help is much appreciated!
|
|