Hibernate_org.hibernate.hql.ast.QuerySyntaxException: Path expected for join
2017-04-06 17:50
671 查看
异常: org.hibernate.hql.ast.QuerySyntaxException: Path expected for join
HQL是面向对象的,所以join的条件是反映在对象的关系中的,所以,你在用join的时候,无论是left join还是right join,都是FROM DomainA a LEFT JOIN a.b b WHERE或者FROM DomainA a RIGHT JOIN a.b b WHERE(a.b其实就已经说明了关系的连接方式)。而不能直接是两个对象直接JOIN。
HQL是面向对象的,所以join的条件是反映在对象的关系中的,所以,你在用join的时候,无论是left join还是right join,都是FROM DomainA a LEFT JOIN a.b b WHERE或者FROM DomainA a RIGHT JOIN a.b b WHERE(a.b其实就已经说明了关系的连接方式)。而不能直接是两个对象直接JOIN。
相关文章推荐
- jpa或bernate使用原生sql进行关联查询org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join
- 每日一得-org.hibernate.hql.ast.QuerySyntaxException: Path expected for join!错误解决办法
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token
- org.hibernate.hql.ast.QuerySyntaxException
- apfuse2.0.2 nested exception is org.hibernate.hql.ast.QuerySyntaxException: Otacity is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: Enroll is not mapped.
- org.hibernate.hql.ast.QuerySyntaxException: myaddressbook is not mapped
- org.hibernate.hql.ast.QuerySyntaxException
- org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token 的解决
- org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User] 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- 在hql中使用left jion 遇到的问题 org.hibernate.hql.ast.QuerySyntaxException:
- org.hibernate.hql.ast.QuerySyntaxException is not mapped
- org.hibernate.hql.ast.QuerySyntaxException is not mapped异常
- org.hibernate.hql.ast.QuerySyntaxException:user is notmapped
- org.hibernate.hql.ast.QuerySyntaxException: Category is not mapped [from Category]
- 求帮助org.hibernate.hql.ast.QuerySyntaxException: unexpected token: id near line 1, column 35 [from com
- 让初学者郁闷之极都问题!org.hibernate.hql.ast.QuerySyntaxException:
- org.hibernate.hql.ast.QuerySyntaxException per is not mapped [from Per as p]