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的:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

   这个应该改为mapping的头文件就行了
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://hibernate.sourceforge.net /hibernate-mapping-3.0.dtd">
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页