[英]Error in hibernate bag for one-to-many mapping
我想像下面這樣定義包
<bag name="tags" table="TAG" schema="abcd">
<key column="TAG_ID"></key>
<element column="TAG_ID" type="long"></element>
<one-to-many class="com.xyzpkg.Tag" />
</bag>
在上述情況下,它們是hbm文件中的xml錯誤,內容為:
The content of element type "bag" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(element|one-to-many|many-to- many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql- delete-all?,filter*)".
此問題是因為您可以具有元素標簽,也可以具有一對多標簽。 不是都。 嘗試刪除元素標簽。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.