我有一个复杂的jpql查询,我需要将其转换为条件Api

时间:2019-10-11 12:36:40

标签: jpql criteria-api

SELECT p FROM Part p WHERE EXISTS (SELECT p1  +
 FROM Part p1, IAssigned ia , HMember hm , User u , Role r  +
 WHERE ia.fromPart.id=p1.id  +
 AND ia.toRole.id=r.id   +
 AND hm.fromAssigned.id=ia.id  +
 AND hm.toUser.id=u.id  +
 AND u.name=:sso  +
 AND p1.id=p.id  +
 AND ia.stopEff is  null   +
 AND hm.startEff is not null AND hm.startEff <= sysdate AND ( (hm.stopEff is null ) OR (hm.stopEff is not null  +`enter code here`
 and hm.stopEff > sysdate))  +
 )AND p.status='Active'

与此相关的条件查询是什么?我陷入了多重联接条款

0 个答案:

没有答案