I’ve looked into this. There is a big difference between the st_extent() and st_envelope() functions. The former is an aggregate function that returns the bounding box for a set of geometries. Whereas the latter returns the bounding box of a single geometry. The st_envelope() (a.ka. envelop()) function works correctly in HQL/JPQL. That it doesn’t work in a native query is currently a limitation of how we handle type resolution internally. I’ll need to investigate this a bit more to see if this can be solved. There Is a problem that the st_extent() function has accidentally been removed in Hibernate 6. I’m fixing this. |