We a mant-to-many relationship modeled in the database (with a bridge table) between Student and Professor, but in our entites we want to model it as a one-to-many relationship i.e. a Student has one Professor.
Here is our attempt, but it doesnt work:
protected StudentMap()
{
Id(x => x.Id);
Map(x => x.Name);
Join("student_professor_selected", m =>
{
m.KeyColumn("student_professor_selected_key");
m.References(x => x.Professor);
});
}