I have the following class:
public class Product
{
public virtual Guid Id { get; set; }
public virtual string Name { get; set; }
public virtual Decimal
I only had this effect when I had an entity that does not return the same value from the property than the value that has been assigned to it. Then it is treated as dirty by NH.
Example:
class Foo
{
private string name;
public string Name
{
// does not return null when null had been set
get { return name ?? "No Name"; }
set { name = value; }
}
}
This is how I would write the mapping file.
You don't need to specify types. They are determined by NHibernate at runtime.