My previous question was closed as duplicate
Use sysdate in @Formula in Oracle and H2
Proposed solution:
How to use current date in H2 database SQL query
I've tried that CURRENT_TIMESTAMP:
@Formula("FLOOR(CURRENT_TIMESTAMP() - last_date)")
private Long daysSinceLastDate;
It's working in integration tests with embedded H2 database, but in running application Oracle:
Caused by: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
CURRENT_TIMESTAMP() is not working at all in Oracle, and CURRENT_TIMESTAMP is not working in H2.