openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ram <ram_ku...@yahoo.co.in>
Subject SysDate-5 days implmentation
Date Thu, 05 May 2011 21:35:29 GMT
Hi,
   I am trying to implement sysdate-5 in jpa. 

select *From emp where joinDate > sysdate-5

        The problem is in db schema, join date is defined as date, but in jpa entites, we
have made it as TimeStamp by using @temporal so the it can store exact timestamp.

      when i tried to query by using @namedQuery, i am getting older than 5 days. But i need
data which is just 5 days old.
    I followed the following link 
http://stackoverflow.com/questions/2539035/how-to-do-a-timestamp-comparison-with-jpa-query

     but still i am getting same problem. Any ideas on this.


Thanks

        

Mime
View raw message