Can I Automap a tree hierarchy 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/05/05
16:58 UTC
Read the original article
Hit count: 244
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; }
}
It 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 override the auto mapper for this sort of structure?
© Stack Overflow or respective owner