码迷,mamicode.com
首页 > Web开发 > 详细

hibernate配置文件 The content of element type "class" must match

时间:2016-10-03 06:47:31      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:

hibernate映射文件hbm.xml出错,错误信息如下:

The content of element type "class" must match
"(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,
(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|
any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-
subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,fetch-profile*,resultset*,(query|sql-query)*)".

 

改正方法:

class标签内缺少ID属性,加上下面内容即可:

<id name="id" type="java.lang.Integer">
    <column name="ID" />
    <generator class="native" />
</id>

hibernate配置文件 The content of element type "class" must match

标签:

原文地址:http://www.cnblogs.com/chwy/p/5928453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!