Java Hibernate 4.3映射文件错误

Java Hibernate 4.3映射文件错误,java,mysql,sql-server,hibernate,mapping,Java,Mysql,Sql Server,Hibernate,Mapping,我犯了一个错误;然而,我不明白为什么会出现这个错误。第一个class元素没有给出任何错误,但是第二个class元素给出了错误。(注意:我有其他映射,但这是相同错误的重复,所以我不担心放入整个文件) 元素类型“类”的内容必须匹配 “(元*、子选择?、缓存?、同步*、注释?、元组化*、(id |复合id)、鉴别器?、自然id?、(版本|时间戳?)、(属性|多对一|一对一|组件|动态组件|属性|任意|映射|集|列表|包| idbag |数组|基元数组),((联接,子类*)|联接子类*),加载程序?,s

我犯了一个错误;然而,我不明白为什么会出现这个错误。第一个
class
元素没有给出任何错误,但是第二个
class
元素给出了错误。(注意:我有其他映射,但这是相同错误的重复,所以我不担心放入整个文件)

元素类型“类”的内容必须匹配

“(元*、子选择?、缓存?、同步*、注释?、元组化*、(id |复合id)、鉴别器?、自然id?、(版本|时间戳?)、(属性|多对一|一对一|组件|动态组件|属性|任意|映射|集|列表|包| idbag |数组|基元数组),((联接,子类*)|联接子类*),加载程序?,sql插入?,sql更新?,sql删除?,过滤器*,结果集*,(查询| sql查询)*)

如有任何帮助,将不胜感激:

代码


主键

设置后放置连接标记零件

<class name = "cdd.model.User" table = "app_user">
    <id name = "userID" column = "user_id" type = "org.hibernate.type.PostgresUUIDType">
        <generator class="org.hibernate.id.UUIDGenerator"/>
    </id>

    <property name = "email" column = "email" type = "org.hibernate.type.TextType"/>  
    <property name = "fullName" column = "full_name" type = "org.hibernate.type.TextType"/>
    <property name = "passwordHash" column = "password_hash" type = "org.hibernate.type.TextType"/>
    <property name = "centre" column = "centre" type = "org.hibernate.type.TextType"/>
    <property name = "accessLevel" column = "access_level" type = "org.hibernate.type.IntegerType"/>

 <set name="acceptedQuestions" table="accepted_questions_by_user">
        <key column="user_id"/>
        <many-to-many column="question_id"
                      unique="true"
                      class="cdd.model.Question"/>
 </set>
</class>
<class name = "cdd.model.Category" table ="category" > 

    <id name ="categoryID" column = "category_id" type = "org.hibernate.type.PostgresUUIDType">
        <generator class = "org.hibernate.id.UUIDGenerator" />
    </id>

    <property name = "title" column = "title" type = "org.hibernate.type.TextType"/>
    <property name = "description" column = "description" type = "org.hibernate.type.TextType" />

    <set name = "questions" table = "category_questions" cascade = "all"  inverse = "true">
        <key column = "category_id" not-null = "true" />
        <one-to-many class = "cdd.model.Question"/> 
    </set>

    <join table = "category" >
        <key column = "category_id"/>
        <many-to-one name="category" column = "category_id" not-null = "true"/>
    </join>

</class>

设置后放置连接标记零件

<class name = "cdd.model.User" table = "app_user">
    <id name = "userID" column = "user_id" type = "org.hibernate.type.PostgresUUIDType">
        <generator class="org.hibernate.id.UUIDGenerator"/>
    </id>

    <property name = "email" column = "email" type = "org.hibernate.type.TextType"/>  
    <property name = "fullName" column = "full_name" type = "org.hibernate.type.TextType"/>
    <property name = "passwordHash" column = "password_hash" type = "org.hibernate.type.TextType"/>
    <property name = "centre" column = "centre" type = "org.hibernate.type.TextType"/>
    <property name = "accessLevel" column = "access_level" type = "org.hibernate.type.IntegerType"/>

 <set name="acceptedQuestions" table="accepted_questions_by_user">
        <key column="user_id"/>
        <many-to-many column="question_id"
                      unique="true"
                      class="cdd.model.Question"/>
 </set>
</class>
<class name = "cdd.model.Category" table ="category" > 

    <id name ="categoryID" column = "category_id" type = "org.hibernate.type.PostgresUUIDType">
        <generator class = "org.hibernate.id.UUIDGenerator" />
    </id>

    <property name = "title" column = "title" type = "org.hibernate.type.TextType"/>
    <property name = "description" column = "description" type = "org.hibernate.type.TextType" />

    <set name = "questions" table = "category_questions" cascade = "all"  inverse = "true">
        <key column = "category_id" not-null = "true" />
        <one-to-many class = "cdd.model.Question"/> 
    </set>

    <join table = "category" >
        <key column = "category_id"/>
        <many-to-one name="category" column = "category_id" not-null = "true"/>
    </join>

</class>

嘿,你能帮我查一下吗?也许你能帮我查一下吗?也许你能帮我查一下