Java CriteriaQuery不相交的结果

时间:2013-11-12 10:02:41

标签: jpa-2.0 eclipselink java-ee-6 criteria-api

我有三个谓词:

Predicate predicate1 = cb.equal(c.get(Transport_.winnerid).get(User_.id), 1L);

Predicate predicate2 = cb.notEqual(c.get(Transport_.senderid).get(User_.id),  user.getID());

Path<Long> longpath = c.join(Transport_.bidList).join(Bid_.bidderid).get(User_.id);

Predicate predicate3 = cb.equal(longpath, user.getID());

现在我想要一个返回的第四个谓词:

predicate4=(Predicate1 && predicate2) minus ("disjoint") predicte3

0 个答案:

没有答案