在学习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-configuration
修改为mapping的头文件就行了
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
本文解决了一个关于Hibernate配置文件xxx.hbm.xml中的错误:属性'column'未声明。问题在于使用了错误的DTD声明,正确的做法是将'hibernate-configuration'更改为'mapping'。
417

被折叠的 条评论
为什么被折叠?



