Maybe I'm misunderstanding the question, but your HasMany mapping points to CurrentState_Id. I think you're mappings should look like:
class MarkovStateMap : ClassMap<MarkovState>
{
public MarkovStateMap()
{
Id(x => x.Id);
Map(x => x.StateContent);
HasMany<TransitionProbability>(x => x.TransitionProbabilities)
.AsMap(x => x.NextState.Id)
.KeyColumn("NextState_Id")
.Not.LazyLoad()
.Inverse();
}
}
class TransitionProbabilityMap : ClassMap<TransitionProbability>
{
public TransitionProbabilityMap()
{
Id(x => x.Id);
Map(x => x.Probability);
References(x => x.CurrentState, "Id");
References(x => x.NextState, "Id");
}
}
Jamie Ide
2010-02-11 13:10:21