I'm having trouble figuring out how to delete a set of records when a particular field is less than the date on the sql server without using tables or field names.
Since I'm using MSSQL the query would look something like this:
DELETE FROM tickets WHERE expires < getdate()
How would I go about getting Hibernate to do this? I'm looking into HQL but I don't see a way to specify getdate()
. Help!