This is from a WHERE clause in HQL:
(current_timestamp() - c.m_some_time) >= :3000) // finding 3 seconds and older
It doesn’t work.
I saw many questions regarding this subject, but they all avoid using current_timestamp() and put a Java Date() instead (using setString()), which is wrong for me as I need precision.
Another approach I saw is deriving a dialect and registering my own function. This one seem to be too blown.
Any way to make a simple time math and compare it to a simple value of milli/seconds, in pure built-in HQL?
Another issue that I’m curious about is why does the above WHERE clause does pass HQL’s checks? I mean, this is a part of an HQL query which works (when the other WHERE clauses are valid).
Eventually there doesn’t seem to be an answer so the best is to extend
Dialectand register a function.