white knight

导航

 
Subquery<A> subquery = criteriaQuery.subquery(A.class);
Root<A> root1 = subquery.from(A.class);

subquery = subquery.select(root1.get("id"));
subquery = subquery.where(criteriaBuilder.and(
    criteriaBuilder.isNotNull(root1.get("value0")),
    criteriaBuilder.equal(root1.get("value1"), root.get("value")),
    criteriaBuilder.equal(root1.get("value00").get("value01"), "aaa")));

criteriaBuilder.exists(subquery);

 

posted on 2018-01-21 08:08  white knight  阅读(601)  评论(0编辑  收藏  举报