I think the 'index' attribute for the column mapping element is what you need. If you are using the latest version of FNH, you can set this to one-to-many, for example:
HasMany(x => x.Components)
.KeyColumns.Add("ProductId", c => c.Index("someIndex");
The same API is not yet available for many-to-many, but it is on its way.
source
share