Since the solution to @Any and @ManyToAny Associations Fail in Spring Boot 3 is available , I decided to update the repository I used to demonstrate that problem. I’ve updated Hibernate from 6.1.7.Final to 6.2.6.Final (and the other packages), ran the HibernatePolymorphApplicationTests and the null pointer exception from the other post was gone! Unfortunately, it was replaced with another one:
It dies at the save method here:
If you look at the definition for PropertyHolder.property, you’ll see null values should be allowed:
The exception persists even if I apply the defaults here:
If I change the test to populate the property field prior to persisting, the test succeeds:
I feel like the not-null property references a null or transient value exception above is incorrect here. FYI, here’s the 5.6.15.Final version of the same repository which performs the same test successfully. |