Under PostgreSQL, I\'m using PersistentDuration
for the mapping between the sql type interval & duration but it doesn\'t work.
Another user found th
PostgreSQL has a date_part / extract function which you can use to return different fields, epoch being one of them. When extracting the epoch from an interval, you receive the number of seconds contained in the interval, and from there you can convert however you wish. I lost my experience with Hibernate, but you can do it this way:
SELECT
average_interval_between_airings
, date_part('epoch', average_interval_between_airings) / 60 as minutes
, date_part('epoch', average_interval_between_airings) as seconds
FROM shows;