Let's say you have two classes: Person and Address.
The person has a link to Address as follows:
public class Person
{
public virtual Address Residence {get;set;}
}
The address has an override of .Equals, which determines whether two instances of the address represent the same physical address (for example, by comparing the zip code and the first line).
Let's say you have two unsaved Person objects that contain references to two unsaved Address objects that are separate (in terms of reference equality) but equal in terms of .Equals implementation.
Will NHibernate issue one INSERT or two?
thank
David
David source
share