When matching HasMany or HasManyToMany in free nhibernate, you can specify the column name to use as a parameter for the AsList () method as follows:
HasMany(c => c.Customers)
.AsList(c => c.Column("PositionIndex"));
I would prefer to install this using the Fluent NHibernate convention (either existing or custom), especially because by default the name "Index" is a reserved word in MSSQL.
I tried using a user agreement that implements IHasManyConvention, but the instance parameter does not seem to contain information about whether there is a list, bag or set, and also does not contain column data for the index column.
public void Apply(IOneToManyCollectionInstance instance)
{
}
Any ideas?