I'm having a problem with aggregate SUM function in JPA (Eclipselink v.2.1.2) which is executed on MySql database. I need to sum values in a field of type 'TIME'. But, executed query returns wrong result. For example, I have two values ('04:15:00' and '05:50:00') and result is 96500. Query (JPQL) is:
SELECT SUM(w.timeSpent) FROM WorkingHours w
What is the proper way to sum Time values in JPA?
Thanks in advance.