This is probably a common question but hours of googling provided no suitable solution,
- I need to use Oracle's flashback capability with the "AS OF" clause
- as far as I can tell JPA JPQL does not support this
- as far as I can tell hibernate criteria queries do not support this
We have JPA entity classes with lots of complex named queries specified and java methods that take input and bind params and execute and everything works fine
I don't want to have to Re-specify all of these queries in SQL so I can append the AS OF clause
I want to look up the JPA named query, determine what the generated SQL will be, then append the AS OF clause to that, and create a new native SQL query to execute
this way all our defined queries remain as is, and only on the rare occasion that we need a flashback query will we go through this process
but it seems ridiculously difficult to determine what SQL will be generated BEFORE it is sent to the DB, unless I am missing something really obvious...
thanks
|