Hibernate异常及解决方式
时间:2007-08-21 来源:sdwsyjp
在一次项目开发中,hibernate.cfg.xml是从同伴电脑上直接拷贝过来的,
当再次建立实体文件时,Hibernate就不会自动将实体文件写入hibernate
.cfg.xml,在程序的执行过程中,就会出现某一个实体是一个UNKNOWN实体!
只要在Hibernate.cfg.xml文件中加入即可.
<mapping resource="org/hibernate/Teachers.hbm.xml" />
<mapping resource="org/hibernate/Document.hbm.xml" />
<mapping resource="org/hibernate/Document.hbm.xml" />
相关阅读 更多 +