Hi,
after upgrading from version 3.3.1, we have an insert which fails with a TransientPropertyValueException.
We also get the following warning in the log:
Code:
09:57:34,955 WARN main UnresolvedEntityInsertActions:163 - HHH000437: Attempting to save one or more entities that have a non-nullable association with an unsaved transient entity. The unsaved transient entity must be saved in an operation prior to saving these dependent entities.
Unsaved transient entity: ([no.cars.domain.Owner#1])
Dependent entities: ([[no.cars.domain.Car#no.cars.domain.Car@5b12]])
Non-nullable association(s): ([no.cars.domain.Car.owner])
The log message is correct, the Owner entity is transient in this case.
The question is why the behavior has changed in newer versions of Hibernate, as this works in 3.3.1 and earlier versions?
Also, is there a switch or property setting in newer versions which will give us the old behavior?
I can provide a Junit test case which shows the problem if needed, with a POM where switching between Hibernate versions will result in a failed or successful test run.
Thanks,
Olav