I have an employee table:
Employee
{
Name
EmployeeId -pk
PositionId -fk
}
The positionId maps to the position table:
Position
{
PositionId -pk
ReportsToId
PositionName
PositionDescription
}
The ReportsToId field is a position Id for that positions manager.
I would like to select out an employee, their position and their managers details.
How would this be done using NHibernate's Mapping.ByCode.
The ReportsToId field is not a key field. From what I've read online, this seems to affect the mapping...