Same table NHibernate mapping
- by mircea .
How can i go about defining a same table relation mapping (mappingbycode) using Nhibernate
for instance let's say I have a class:
public class Structure{
public int structureId;
public string structureName;
public Structure rootStructure;
}
that references the same class as rootStructure.
mapper.Class<Structure>(m =>
{
m.Lazy(true);
m.Id(u => u.structureId, map => { map.Generator(Generators.Identity); });
m.Property(c => c.structureName);
m.? // Same table mapping
}
;
Thanks