The Hibernate team is already working on a solution for this, but the solution is currently only targeted for Hibernate 6 which will still take a while. I don't want to be rude, but if you need a solution earlier because this is so important to you, why aren't you paying for Red Hat support so that this gets a higher priority? If you don't have the bucks, no problem. Thankfully Hibernate is open source and we would certainly consider merging a PR for this if you provide one. As for "other frameworks", I'm the author of Blaze-Persistence and the JPA Criteria module is just an alternative implementation of the JPA Criteria API on top of a JPA provider which doesn't have this issue. So you wouldn't have to change your code, just configure it and you'd be good to go. |