SpringBoot 3.1.2 Upgrade (from 3.0.6) - Existing Unidirectional @OneToOne mapping no longer works. (hibernate.PropertyAccessException)
Problem:
I am currently upgrading an API from SpringBoot 3.0.6 to SpringBoot 3.1.2. Internally, Hibernate also gets updated from 6.1.7.Final to 6.2.6.Final.
With this minor version update, existing @OneToOne mappings break when calling the RecordDao because it is unable to infer the correct types between the 2 child entities that is defined in the Record entity.
Caused by: org.hibernate.PropertyAccessException: Could not set value of type [com.hidden.CurrentRole] :...