Replying to myself again... from the Hibernate product evaluation FAQs: (
https://www.hibernate.org/263.html)
Does Hibernate support handwritten SQL?In Hibernate 3.0, any generated SQL statement may be overridden in the Hibernate mapping metadata. Hibernate also supports queries expressed in the native SQL dialect of the underlying database and offers facilities to integrate them cleanly into your application without creating dependencies. In practice, most users find that they need these features much less often than they expect.
In addition, Hibernate allows definition of "derived" entities and derived attributes, where a class or property maps to a SQL select or SQL formula embedded in the mapping document