Moving from Spring Boot 2 to Spring Boot 3 forces a move from Hibernate 5 to Hibernate 6.
We have an application that uses a dynamically constructed CriteriaQuery to display data in a UI, but then to allow download of the data we make use of PostgreSQL UNLOAD command to send the data to an AWS S3 bucket. The generation of the UNLOAD commands requires the translation of the CriteraQuery to String representing the corresponding SQL SELECT statement.
The translation is currently being done with the getQueryMethod() after unwrapping the TypedQuery. A direct replacement seems to be missing, does anyone know how this might be accomplished within Hibernate 6?