|
|
|
@ -479,9 +479,6 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { |
|
|
|
.append(" and ") |
|
|
|
.append("nr.").append(fromOrTo).append("_type").append(" = re.").append(toOrFrom).append("_type"); |
|
|
|
|
|
|
|
if (!StringUtils.isEmpty(entityFilter.getRelationType())) { |
|
|
|
notExistsPart.append(" and nr.relation_type = :where_relation_type"); |
|
|
|
} |
|
|
|
notExistsPart.append(")"); |
|
|
|
whereFilter += " and ( re.lvl = " + entityFilter.getMaxLevel() + " OR " + notExistsPart.toString() + ")"; |
|
|
|
} |
|
|
|
@ -554,9 +551,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { |
|
|
|
|
|
|
|
StringBuilder notExistsPart = new StringBuilder(); |
|
|
|
notExistsPart.append(" NOT EXISTS (SELECT 1 from relation nr WHERE "); |
|
|
|
notExistsPart.append(whereFilter.toString()); |
|
|
|
notExistsPart |
|
|
|
.append(" and ") |
|
|
|
.append("nr.").append(fromOrTo).append("_id").append(" = re.").append(toOrFrom).append("_id") |
|
|
|
.append(" and ") |
|
|
|
.append("nr.").append(fromOrTo).append("_type").append(" = re.").append(toOrFrom).append("_type") |
|
|
|
|