【hibernate】Attribute "column" must be declared for element type "property"解决办法

在学习hibernate的过程中,自己写的xxx.hbm.xml文件 出现错误:
Attribute "column" must be declared for element type"property"

这是因为我是复制了
hibernate.cfg.xml的头部文件:

        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

不应该用hibernate-configuration
修改为mapping的头文件就行了

        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">





你可能感兴趣的:(Hibernate)