[英]Error in hibernate bag for one-to-many mapping
I want to define the bag like the following way 我想像下面这样定义包
<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>
In above case their is xml error in hbm file saying: 在上述情况下,它们是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*)".
This issue is because you can have either element tag or you can have one-to-many tag. 此问题是因为您可以具有元素标签,也可以具有一对多标签。 Not both. 不是都。 Try removing the element tag. 尝试删除元素标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.