jagregory/fluent-nhibernate — Issue #124: OptimisticLock in HasMany/HasManyToMany broken
Author: NOtherDev
Created: 2012-01-22 18:49:15+00:00
State: open

In Fluent NHibernate 1.3, when trying to use `OptimisticLock` option in `HasMany`/`HasManyToMany` chain, it's not possible to set boolean value there, expected by NHibernate. Fluent NHibernate offers choosing one of options available only at entity level. Choosing any value results in `XML validation error` exception when creating session factory.

It is:

HasMany(x => x.Users).OptimisticLock.Version();

It should be:

HasMany(x => x.Users).OptimisticLock();

See also: http://notherdev.blogspot.com/2012/01/mapping-by-code-set-and-bag.html