I have a problem where I am getting an: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 when trying to call a postgres function using JPA cre
This could be a hack, but it worked for me and is pretty simple. Just change the query to:
SELECT count(*) FROM your_function();
Now it returns a proper integer and hibernate is happy.