Is it possible to automatically display a simple structure of nested objects?
Something like that:
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; } }
At runtime, it raises the following error:
Duplicate column in collection mapping: SharpKtulu.Core.Employee.Manages: EmployeeFk column
Is it possible to automate this structure, or am I redefining the autoframe for this kind of structure?
, , , " " + "Fk". , FK "" "". , FK , , EmployeeManagerFk EmployeeManagesFk. , (EmployeeManagerInEmployeeFk) ..
. , . HasMany/ManyToMany . FNH, Google, - .
.hbm . NHibernate , , .hbm - , / "" , , . , .
:
http://fluentnhibernate.lighthouseapp.com/projects/33236/tickets/115-self-referencing-relationships
Source: https://habr.com/ru/post/1736385/More articles:Disable native Soap class in PHP5 and use nuSoap? - phpShow meshes on a grid - c #How does the OS deal with python python that has more memory? - pythonWPF application crashes after publishing ClickOnce - visual-studio-2008Where to Find Free Trading Algorithm Tutorials - algorithmLike abstract NHibernate to avoid hard addiction and ease testing - abstractionGoogle engine: new version does not appear - pythonsubversion: how to view comments tagged - svnWhat is the exit code VT100 for the keyboard key "esc" - pythonHow are arguments evaluated in a function call? - cAll Articles