Hello Hibernate Team, My team and I have tried updating one of our main software projects from Hibernate 6.1.6 to 6.2.3 and we are unable to perform this upgrade due to an issue. I have dug around enough, and have figured out the particular commit which is causing the issue. The following code (hibernate-core/src/main/java/org/hibernate/mapping/Set.java:createPrimaryKey) needs to be looked at again and re-evaluated. I can provide a test-case in time, but as of right now, I do not have the test-case for you. Here is a link to the particular commit which prevents us from upgrading to 6.2.3: https://github.com/hibernate/hibernate-orm/commit/9341df0b8b5c1eee2a54efd9c2404d511490c836 Old (working) code from 6.1.6 tag:
New (broken) code from 6.2.3 tag:
It looks like dreab8 (Andrea Boriero) was trying to solve this particular Jira ID: https://hibernate.atlassian.net/browse/HHH-15759 Now I am not sure what the final fix should be, as reverting this commit may cause the original issue to break as well, however I am certain that current state the code is in is not the correct solution, as it causes major breakage in our (very) large project. I would suggest playing around with a debugger to understand what is going on here. Here’s my annotation:
Here is the original exception I got:
In our particular situation, we believe “idn” in this case should not be part of the referenced primary key (interlocking [idn,ctl_interlocking]). That is the mistake that is breaking the code. |