Hibernate 4.3.6 QuerySyntaxException:预期加入的路径

Hibernate 4.3.6 QuerySyntaxException:预期加入的路径,第1张

Hibernate 4.3.6 QuerySyntaxException:预期加入的路径

此异常 “预期加入的路径” 表示:

提供从一个实体到另一个实体的路径。连接由映射定义

因此,我们需要:

select lip.referenceId    from Parcel as lip    // instead of this   // left join TransportFile tf    // we need a path from Parcel to TransportFile   left join lip.transportFile tf    where lip.statusDisplayName != tf.statusDisplayName'   ...

该语句

left join TransportFile tf
更像是SQL …对于HQL而言并非如此。

我们的声明必须表示导航:

left join lip.transportFile tf
-即加入
transportFile
与相关的
lip



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5124834.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-17
下一篇 2022-11-17

发表评论

登录后才能评论

评论列表(0条)

保存