Hi,
I am trying to query to database using hibernate criteria query, where one of the restriction is that the "validupto" property has to be grater than the DB's (oracle) "current_timestamp" ( from dual )
The criteria I made is --
Criteria criteria = session.createCriteria(Holiday.class, "h") .add(Restrictions.ge("validUpTo", "current_timestamp"); List<Holiday> holidays = criteria.list();
I know this is not going to work. So friends, please share some sample code or ideas, how to compare the date_column of a table with the DB's current_timestamp using hibernate criteria query.
Thanks Paragflume
|