Hi,
I've just upgraded to 3.1.3 from 3.0.5 and my previous working mapping throws this exception.
A search in this forum lead me to topic
[url=http://forum.hibernate.org/viewtopic.php?t=945266]945266[/url], that makes clear the point that one-to-one associations don't have orphan-delete.
I have to say that I've read several times the 3.0.5 docs and also HIA book, but I missed the "delete-orphan,applies only to one-to-many associations" in chapter 11.11 (10.11 in 3.1 docs). Well, is my fault, but in 3.0.5 you can map a one-to-one with all,delete-orphan and everything runs ok, at least until you realize the orphans are still there (which wasn't my case yet).
With version 3.1.3 you get this exception , which is a great thing.
My app was now in beta testing with real clients and this exception has saved me lots of future time and headaches.
I've decided to write this post just for those few that having one-to-one associations wrong mapped with delete-orphan upgrade to 3.1 and can be startled by this exception.
Best regards.
Rodolfo
|