person and LoginInfo is one-to-one,
I want to delete Person's Loginfo, and it runs ok without any exceptions, but the record of Logininfo still in database.
Example:
//Person hbm.xml
Code:
<one-to-one name="TheLoginInfo" class="Entity.LoginInfo, Entity" cascade="all-delete-orphan" outer-join="true" />
//Loginfo hbm.xml
Code:
<one-to-one name="ThePerson" class="Entity.Person, Entity" constrained="true" outer-join="true"/>
//Test code:
Code:
Person person = (Person)iParty.GetPartyByID("1");
person.TheLoginInfo.ThePerson = null;
person.TheLoginInfo = null;
session.update(person);