-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate query to get current DB time with interval
PostPosted: Tue Oct 02, 2012 9:27 am 
Newbie

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.