How do I map to a parent or child in the same table with NHibernate?

Posted by adolfojp on Stack Overflow See other posts from Stack Overflow or by adolfojp
Published on 2010-03-16T22:55:09Z Indexed on 2010/03/17 9:21 UTC
Read the original article Hit count: 152

Lets suppose that I have a Category table with a column that holds the id of a parent or child category from the same table. This design would allow me to have unlimited levels of Categories, or unlimited levels in a thread, for example.

How can I map this relationship with NHibernate? Are there any disadvantages or warnings that I should take into consideration when doing this?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about .NET