nhibernate many-to-many mapping - additional column in the mapping table?
问题 I have following mapping definitions: <class name="Role" table="Role" optimistic-lock="version" > <id name="Id" type="Int32" unsaved-value="0" > <generator class="native" /> </id> <property name="RoleName" type="String(40)" not-null="true" /> <bag name="UsersInRole" generic="true" lazy="true" cascade="all" table="UserRoles" > <key column="RoleId" /> <many-to-many column="UserId" class="SystemUser, Domain"/> </bag> and <id name="Id" type="Int32" unsaved-value="0" > <generator class="native" />