I’m currently re-working all of the treat optimizations for Hibernate 6 and will try to finish that for 6.2.0.Final, but I doubt that we can reasonably fix this in 5.
Sounds good - thanks. For the record, I found a workaround for this. You can avoid the bug by changing expressions like cb.treat(animal, Dog.class) into ((From<?, Dog>)(Object)animal), and then adding @SuppressWarnings of course. |