Can i Automap a tree heirarchy with fluent nhibernate?
        Posted  
        
            by NakChak
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by NakChak
        
        
        
        Published on 2010-03-10T20:51:36Z
        Indexed on 
            2010/03/14
            15:15 UTC
        
        
        Read the original article
        Hit count: 348
        
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?
© Stack Overflow or respective owner