当前位置:编程学习 > JAVA >>

hibernate 执行hql报错:org.springframework.orm.hibernate3.HibernateQueryException

org.springframework.orm.hibernate3.HibernateQueryException: MonitorSection is not mapped [from MonitorSection as model where model.effect='1' ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: MonitorSection is not mapped [from MonitorSection as model where model.effect='1' ]

MonitorSection.hbm.xm配置文件




dao方法




搞了好久都没搞出来 --------------------编程问答-------------------- MonitorSection 这个不映射   effect  是不是大小写的问题,换成大写试试  --------------------编程问答--------------------
引用 楼主 oqq19161 的回复:
org.springframework.orm.hibernate3.HibernateQueryException: MonitorSection is not mapped [from MonitorSection as model where model.effect='1' ]; nested exception is org.hibernate.hql.ast.……

还是不行 --------------------编程问答--------------------
引用 1 楼 muyipan 的回复:
MonitorSection 这个不映射   effect  是不是大小写的问题,换成大写试试

还是不行 --------------------编程问答-------------------- MonitorSection.hbm.xml加到hibernate配置文件了吗?
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,