org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped !
来源:互联网 发布:scala java 混合 编辑:程序博客网 时间:2024/05/17 08:34
这一般是HQL语句错误
因为Hibernate是对类查询的 ,而不是对数据库表进行查询
例如:
return getHibernateTemplate().find("from organization o where o.parent.id=?", new Integer(parentId));
organization 是数据库中的表,而organization 对应的类是Organization.java,现在只需要将teachers改为Teachers就可以了,即
我们将 "from organization o where o.parent.id=?" 改成
"from Organization o where o.parent.id=?"就ok了
因为Hibernate是对类查询的 ,而不是对数据库表进行查询
例如:
return getHibernateTemplate().find("from organization o where o.parent.id=?", new Integer(parentId));
organization 是数据库中的表,而organization 对应的类是Organization.java,现在只需要将teachers改为Teachers就可以了,即
我们将 "from organization o where o.parent.id=?" 改成
"from Organization o where o.parent.id=?"就ok了
0 0
- org.hibernate.hql.ast.QuerySyntaxException:XX is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped !
- spring&org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped !
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped [from XX]
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped hibernate 注解出错
- org.hibernate.hql.ast.QuerySyntaxException is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: myaddressbook is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: Enroll is not mapped.
- org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结 .
- 技术人员如何创业《三》- 合伙人的分工
- Linux异步通知 fasync
- 十七. 增加一个项目协作留言板功能(三)----- 增加任务的修改和删除功能
- nyoj 35 表达式求值<模拟+栈>
- 技术人员如何创业《四》- 打造超强执行力团队
- org.hibernate.hql.ast.QuerySyntaxException: XX is not mapped !
- Eclipse创建maven项目的详细过程
- Building a Crosswalk application
- C#局域网内UDP广播获取获取JSON数据并解析
- hdu 2089 入门数位dp
- 链表算法集锦(C语言实现)
- linux应用编程---控制程序转回到被保存的位置
- 将数组奇数放在偶数前面,并保持相对位置不变
- php中while和do—while循环语句