我试图在hibernate查询下运行。但它给我一个错误,因为" org.hibernate.QueryException:外部或完全连接必须后跟路径表达式"
有人可以告诉我这个查询有什么问题吗?
select P from Package P left join PkgBid PB
where P.pid = PB.pid
and P.bemsid = 2148862
and P.packagestatus= 1
and PB.pid is null
order by P.pid
答案 0 :(得分:0)
您的加入需要on
条款。确切的语法取决于您的实现,但可能类似于:
select P.*
from Package P
left join PkgBid PB
on P.pid = PB.pid
where P.bemsid = 2148862
and P.packagestatus = 1
and PB.pid is null
order by P.pid