NHibernate - How to map composite-id with parent child reference
问题 i have the following scenario (For better illustration, the example is very simplified) Database Model BAS_COSTCODE refers to BAS_CONTEXT. The key for this table is a composite with COSTCODEID and the CONTEXT_FK. CONTEXT_FK refers to BAS_CONTEXT. To build up a hierarchical tree, a CostCode can have a parent. For this reason there is a reference to the table itselfe. The schema file for Context is like that: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate