I have a Case class which exposes a Person object as follows:
public class Case
{
public virtual Person Deceased {get;set;}
}
I have a PersonalAsset class which also exposes a Person:
public class PersonalAsset
{
public virtual Person Owner {get;set;}
}
Assuming I write the following code within an ISession:
Case case = new Case();
Person deceased = new Person();
case.Deceased = deceased;
PersonalAsset asset = new PersonalAsset();
asset.Owner = deceased;
session.SaveOrUpdate(case);
Is there any mapping configuration which will save the PersonalAsset automatically? Or do I need to call session.Save(asset) as well?
Thanks
David