openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ram <>
Subject SysDate-5 days implmentation
Date Thu, 05 May 2011 21:35:29 GMT
   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

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



View raw message