If it's simple one child, one-of-many parents, then you want many-to-one (with unique="true", if NHibernate supports that, but I don't think that it does). The parent table gets a column referring to the child table.
If it's one child, any number of parents, and each parent may have any number of children, that's when you need many-to-many with a join table. Neither table refers to the other: instead you have a new ParentChild table with the parentId and the childId. That way you have have many rows with the same parentId (different childIds), and many rows with the same childId (different parentIds).
|