After migrating to Spring Boot 2.6.7, all my OneToOne associations using EmbeddedIds fail on cascading persist. Please see a simplified repro here. With Spring Boot 2.5.13 the setup works just fine but fails with org.hibernate.property.access.spi.PropertyAccessException on Spring Boot 2.6.7.

Please let me know if this issue should be reported elsewhere

Comment From: wilkinsona

Thanks for the sample.

The change in behaviour appears to be due to Hibernate. Spring Boot 2.6.x uses Hibernate 5.6.x and Spring Boot 2.5.x uses Hibernate 5.4.x. If I update your Boot 2.5.x based sample to use Hibernate 5.6.x, it fails in the same way as your Boot 2.6.x based sample. Similarly, if I update your Boot 2.6.x based sample to use Hibernate 5.4.x (and configure the physical naming strategy as the default, CamelCaseToUnderscoresNamingStrategy, doesn't exist in Hibernate 5.4), it passes.

Having done a bit of a binary chop, it appears that the change in behaviour was introduced in Hibernate 5.5.0.Alpha1. I can't see anything in the Hibernate 5.5 migration guide so it would appear that the change in behaviour may not be intentional. I would recommend reporting it to the Hibernate team.

Comment From: michal-kaciuba

Thanks, here's the ticket.