Joined: Tue Oct 02, 2012 9:18 am Posts: 1
|
Hi,
I am very new in Hibernate. I need a Hibernate query to get the current DB time and also a time before 10 seconds. In my application I have a requirement of getting the records that are updated in last 10 seconds.
I have achieved this by using SQL query : "Select * FROM audit_trail WHERE ENTITY_NAME = 't_loads_master' AND UPDATE_TIME > (NOW() - INTERVAL 10 SECOND)"
I want the same query in Hibernate can anyone help me out I am much confused in how to get (NOW() - INTERVAL 10 SECOND) in hibernate
|
|