org.hibernate.hql.ast.QuerySyntaxException is not mapped异常
2012-11-05 19:37
477 查看
解决方案:
这一般是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了
这一般是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了
相关文章推荐
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User] 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User] 异常总结
- 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 异常总结
- 异常收集-org.hibernate.hql.internal.ast.QuerySyntaxException: activityinfo 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 异常总结 .
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- Hibernate异常: org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User]
- 异常:org.hibernate.hql.ast.QuerySyntaxException: EmpModel is not mapped [from EmpModel where name = ?
- org.hibernate.hql.ast.QuerySyntaxException: **** is not mapped 异常总结
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped [from XXX]
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: FwbzItem is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:user is notmapped