Oracle + JPA - querying with INTERVAL

JPA and Hibernate does not sopport interval, finally I found it...

Date arithmetic is also supported, albeit in a more limited fashion. This is due partially to differences in database support and partially to the lack of support for INTERVAL definition in the query language itself. Source: http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch11.html

Only the BETWEEN keyword can be used. Take care

Btw the correct expression was:

     select x from MyEntity x where cast((systimestamp - (1/24/60) * 10) as timestamp) between lastUpdated and systimestamp

Tags:

Oracle

Select

Jpa