Joined: Fri Mar 17, 2006 3:54 pm Posts: 6
|
With hibernate 3.2. I am using an HQL query. It has no problem accepting mysql's "unix_timestamp" function. However, it fails miserably when using a DB other than MYSQL. My question is two fold
1. If HQL query does not really support unix_timestamp() why does it allow it with my sql (this is not a native query after all!)
2. Can anybody suggest an alternative to a HQL db agnostic query that currently does something like this in mysql:
AVG(UNIX_TIMESTAMP(Q1.createTime)-UNIX_TIMESTAMP(Q2.createTime)) AS AVG
Thanks for any input/feedback
|
|