jagregory/fluent-nhibernate — Issue #110: can't set more than one Keycolumn  in SubclassMap<> anymore
Author: firo222
Created: 2011-11-22 16:20:13+00:00
State: open

this issue is not present in FNH 1.2 but with current Head

public class TestMap : SubclassMap
{
public TestMap()
{
KeyColumn("col1");
KeyColumn("col2");

// key has both columns here
}
}

var provider = (IIndeterminateSubclassMappingProvider)new TestMap();
var count = provider.GetSubclassMapping(SubclassType.JoinedSubclass).Key.Columns.Count();
// count == 1
// Columns.First().Name == "col1"

i tracked it down to FNH.Util.DeepCopy() which is broken for HashSet<>, Dictionary<,>, and LinkedList<> see

http://stackoverflow.com/q/4193868/671619