我需要你的帮助。
我用<Join>
标签映射了我的班级并且还想添加<bag>
就像是 :
<class name="Hilan.HilanNet.Common.Pension.ClassA,Hilan.HilanNet.Common" table="ClassA_VW">
<cache usage="read-write"/>
<composite-id>
<key-property name="columnA" column="sqlColumnA"/>
<key-many-to-one name="columnB" column="sqlColumnB" class="Hilan.HilanNet.Common.Pension.ClassB, Hilan.HilanNet.Common" />
</composite-id>
other properties
<join optional="true" table="AdditionalColumns_TB" inverse="false" >
<key>
<column name="columnA" />
<column name="columnB"/>
</key>
<property name="propertyA" />
</join>
here I want to add the bag
<bag
name="Details"
lazy="true"
inverse="true"
access="nosetter.camelcase-underscore"
table="Details_VW" cascade="all">
<cache usage="read-only"/>
<key>
<column name="ColumnA" />
<column name="ColumnB"/>
</key>
<property name="PrincipalId" />
</bag>
</class>
但我得到一个错误 -
“命名空间‘urn:nhibernate-mapping-2.2’中的元素‘类’在命名空间中有无效的子元素‘bag’”
为什么我做不到??
谢谢 !