Both entity A & B's id are:
CompositeId().KeyProperty(x => x.Id).KeyProperty(x => x.Type);
While entity B should Reference entity A (it has a property "A" of type A). I tried:
References(x => x.A).Columns("AId", "Type");
Which gave me IndexOutOfRange exception when trying to insert, the reason was that the "Type" property was mapped twice. So I added:
References(x => x.A).Columns("AId", "Type").Not.Update().Not.Insert();
Which causes AId to always be NULL because it's defined not to be inserted. I want it to be insertable and updatable, while "Type" not to be. How can I do this?