tenwit wrote:
The ref docs section 5.1.10 says "Note that single valued associations (many-to-one and one-to-one associations) do not support orphan delete." This is the expected behaviour.
OK, here are the facts:
1. NHibernate docs version 1.0.2 section 5.1.10 does NOT contain the text quoted (I checked the docs and Hibernate 2.1.7 -the version from which .NET version is ported from- doesn't have it either , its just in Hibernate 3 docs)
2. Orphan delete in one-to-one associations in effect IS NOT SUPPORTED, but
3. Many people in the Hibernate forum have argumented that orphan delete in one-to-one associations really IS THE EXPECTED BEHAVIOUR.
For now we should use session.delete(user.address) and user.address=null, but (N)Hibernate developers should strongly consider to implement the more natural and expected behaviour.