public class Parent
{
public virtual field1 { get; set;}
public virtual field2 { get; set;}
public virtual Child { get; set;
}
public class Child
{
public virtual childfield1 { get; set;} //composite primary key
public virtual childfield2 { get; set;} //composite primary key
public string somedescription { get; set;}
}
If I had to map just on one field, I could have done below in the Parent map class:
References(x => x.Child).ForeignKey("field1");
How can I do it if the join has to be on two keys field1 and field2?
and to access the ChildKey1 (column) without loading the child