"表名" si not mapped 问题
来源:互联网 发布:模胚报价软件 编辑:程序博客网 时间:2024/06/06 02:56
在执行显示数据库数据的时候出错
大概提示说:
errors: s.entr_Id
student is not mapped
碰到这种情况一般是: hql的配置文件和数据库的数据弄混了
要知道 hql是写的是PO对象,不是table名
数据库里的studnet表反转后生成Student.hbm.xml和Student.java
Student.hbm.xml部分代码如下:
<class name="com.hibernate.student" table="student">
<id name="id" type="java.lang.String">
<column name="id" />
<generator class="native" />
</id>
<property name="entrId" type="java.lang.String">
<column name="entr_Id" not-null="true" />
</property>
<property name="chName" type="java.lang.String">
<column name="chName" length="20" />
</property>
在ADO文件中。查询语句 hql="from student s where s.entr_Id=?;
是不正确的
应该改成hql="from Student s where s.entrId=?;
注意区分大小写。
- "表名" si not mapped 问题
- org.springframework.orm.hibernate3.HibernateQueryException:表名 is not mapped
- 【Bug日常】 Admin(表名)is not mapped
- is not mapped 问题
- 关于hibernate的is not mapped问题
- Hibernate XX is not Mapped问题笔记
- hibernate:XXX is not mapped问题
- hibernate 出现 is not mapped 问题
- Hibernate 中出现 xxx表 is not mapped xxx的问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 XXXX is not mapped 问题
- SSH框架中hibernate 出现 user is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- is not mapped问题,Spring加载jar中配置文件
- hibernate:XXX is not mapped问题的解决
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- hibernate:运行时出现user is not mapped问题
- 浏览器流行对比
- windows 判断文件是否存在
- 10. Session flush操作
- 给mysql数据表加索引的一次经验与体会.
- 浅谈搜索引擎排名和长尾关键词的关系
- "表名" si not mapped 问题
- 获取一个系统中的可用的最新版本的DomDocument对象
- 地图投影为什么
- 什么是mono?
- 平滑缩放显示图片
- 我的第1个OpenGL ES程序 for WinCE5 HTC TouchHD
- csdn connect error
- 2010年年度计划及发展进度
- IT服务台的进化(2)--企业外部服务台的优缺点