|
|
|
@ -663,7 +663,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { |
|
|
|
.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"); |
|
|
|
|
|
|
|
notExistsPart.append(" and nr.relation_type_group = 'COMMON'"); // hit the index, the same condition are on the recursive query
|
|
|
|
notExistsPart.append(")"); |
|
|
|
whereFilter += " and ( r_int.lvl = " + entityFilter.getMaxLevel() + " OR " + notExistsPart.toString() + ")"; |
|
|
|
} |
|
|
|
@ -755,7 +755,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository { |
|
|
|
.append("nr.").append(fromOrTo).append("_type").append(" = re.").append(toOrFrom).append("_type") |
|
|
|
.append(" and ") |
|
|
|
.append(whereFilter.toString().replaceAll("re\\.", "nr\\.")); |
|
|
|
|
|
|
|
notExistsPart.append(" and nr.relation_type_group = 'COMMON'"); // hit the index, the same condition are on the recursive query
|
|
|
|
notExistsPart.append(")"); |
|
|
|
whereFilter.append(" and ( r_int.lvl = ").append(entityFilter.getMaxLevel()).append(" OR ").append(notExistsPart.toString()).append(")"); |
|
|
|
} |
|
|
|
|