Can i Automap a tree heirarchy with fluent nhibernate?
- by NakChak
Is it possible to auto map a simple nested object structure?
Something like this
public class Employee : Entity
{
public Employee() {
this.Manages = new List<Employee>();
}
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual bool IsLineManager { get; set; }
public virtual Employee Manager { get; set; }
public virtual IList<Employee> Manages { get; set; }
}
Causes the following error at run time:
Repeated column in mapping for collection: SharpKtulu.Core.Employee.Manages column: EmployeeFk
Is it possible to automap this sort of structure, or do i have over ride the auto mapper for this sort of structure?