I'm using the following mapping:
public class LoadMap : IAutoMappingOverride<Load> {
public void Override(AutoMapping<Load> mapping) {
mapping.HasMany(x => x.Bids).OptimisticLock.None();
mapping.Version(x => x.Version);
}
}
But when I try to create the session I get the following exception:
[FormatException: The string 'none' is not a valid Boolean value.]
[XmlSchemaValidationException: The 'optimistic-lock' attribute is invalid - The value 'none' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:boolean' - The string 'none' is not a valid Boolean value.]
I'm using NHibernate 2.1.2.4000 and I was using Fluent NHibernate 1.0RTM, but tried the latest build 636 just to be sure this isn't something that was fixed recently or something.
As a side note, in case I'm doing this all wrong, I would like to be able to make changes to the .Bids list without incrementing Version. I saw an example on Ayende's blog that did what I wanted with properties.