I use avg() function to calculate the average time for some selected rows, using something like:
'avg(t.datetime1 - t.datetime2)'
Since MySql is in behind, the returned result is in 'military' format, e.g. for average time of 3 min and 5 sec, the result is : 305.
I also know that other databases (Oracle) does not return the avg of datetime in the same format (its in days?)
Anyhow, I just wonder if Hibernate ...
[1] ...just pass the returned result of the query, without any further processing that might occur due to different db layer; or
[2] ...process the returned results, so the returned result will be the same for any implemented db.
Of course, answer #2 is expected from a good orm tool. So, can anyone officially confirm which answer is correct, #1 or #2?
Thank you in advance.
|