Hi Andrea, Thank you for looking into this! The original (Hibernate 4.3.11) code is using hbm.xml model instead of annotations. Also, we used to use Session’s update, save, and saveOrUpdate methods, which are now deprecated, so these were changed to persist and merge. Model.hbm.xml hibernate.xml Top (25bf5227-c146-4c15-90be-cf725ba44d6b).java Middle (0220a311-57fe-404b-a224-727a837f03b8).java HashTest (7df9f90c-894e-4c32-bb0f-050269d1d434).java Bottom (f047f675-00dd-45d6-b976-b000034217b2).java I have modified the test to mimic our original code. See the attached files. It does not fail using Hibernate 4.3.11. If I change the test to use merge instead of update, it fails with the NullPointerException (in the AbstractTypeDescriptor.extractHashCode). So, the problem seems to be related to using merge instead of update instead of the upgrade per se. But still, I do not really understand why there is a difference. |