Many-to-many with Same Id Key fields
问题 How do I join two tables as many-to-one and one-to-many in nHibernate. They both have the same 'PLAN_ID' as the key column. My Database structures pre-existing. Below is the mapping I am using and the error I'm getting: Table: PLANN ( one ) PLAN_ID <-- PRIMARY KEY START_DATE CHECK_CHAR ... Table: PLANN_DOCUMENT ( to many ) PLAN_ID <-- PRIMARY KEY DOC_ID <-- ID to a DOCUMENT table DOC_NAME DOC_TYPE Plann class: public virtual... PlanId, StartDate, CheckChar, PlanStatus, public virtual ISet