Home >Database >Mysql Tutorial >ssh框架下显示数据库内容失败的原因

ssh框架下显示数据库内容失败的原因

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:16:321322browse

ssh框架下使用hql语言访问数据库,容易犯一些错误。 总结几个可能的原因(假设数据库表名字叫table,持久化类叫Table) 1.hql语言中持久化类名写成了表名,例如 string hql = select Table; 正确,但若写成 string hql=select table; 则错误 2.applicationCo

ssh框架下使用hql语言访问数据库,容易犯一些错误。

总结几个可能的原因(假设数据库表名字叫table,持久化类叫Table)

1.hql语言中持久化类名写成了表名,例如  string hql = "select Table";  正确,但若写成 string hql="select table"; 则错误

2.applicationContext.xml文件中忘记添加例如如下面的内容:


   
    com/car/po/Customer.hbm.xml
    com/car/po/BookingAdmin.hbm.xml
   

  

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn