@Override public Expression<?> joinMapValue(Expression<?> currentCriteriaPath, MetaAttribute pathElement, Object key) { MapJoin<Object, Object, Object> mapJoin = ((From<?, ?>) currentCriteriaPath).joinMap(pathElement.getName(), JoinType.LEFT); Predicate mapJoinCondition = cb.equal(mapJoin.key(), key); Predicate nullCondition = cb.isNull(mapJoin.key()); addPredicate(cb.or(mapJoinCondition, nullCondition)); return mapJoin; }
MapJoin customPropertyJoin = customPropertyFrom.joinMap("otherAttributes"); customPropertySubquery.select(customPropertyFrom.get("id")); customPropertyPredicates = new ArrayList<>(); MapJoin customPropertyJoin = customPropertyFrom.joinMap("otherAttributes"); customPropertySubquery.select(customPropertyFrom.get("id")); customPropertyPredicates = new ArrayList<>();