fluent-nhibernate
fluent-nhibernate copied to clipboard
Purpose of OptimisticLock.Version()?
Hello,
I couldn't find this in the documentation but can someone please explain the purpose of OptimisticLock.Version() inside a classmap? From what i can tell, it does nothing. The below map works fine without it when using a version column.
public class PersonOptimisticConcurrencyVersionMap : ClassMap<PersonOptimisticConcurrencyVersion>
{
public PersonOptimisticConcurrencyVersionMap()
{
Id(x => x.Id).GeneratedBy.Identity();
// This does nothing
// OptimisticLock.Version();
// Use a version column which is recommended
Version(x => x.OptimisticConcurrencyVersion);
Map(x => x.FirstName).Not.Nullable();
Map(x => x.LastName).Not.Nullable();
}
}