I have a class that references another class with a composite Id:
SingleIdClassMap(){
Id(x=>x.Id);
References(x=>CompositeIdClass);
}
CompositeIdClass(){
CompositeId().KeyReference(x => x.SingleIdClass).KeyReference(x => x.DynamicProperty);
}
Now this does not compile since in the SingleIdClassMap
, there is no information about the DynamicProperty
. I want this to be loaded from another class at runtime:
PropertyClass.Singleton.GetCurrentProperty();
Is there a way to tell NHibernate that it can retrieve the value for the second part of the composite key from PropertyClass.GetCurrentProperty()
?