Skip to content

Commit 0f01ff3

Browse files
committed
Support performing "or exists" query if any operator on hasMany property filter starts with "|"
1 parent 6fefdff commit 0f01ff3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ class DSSqlAdapter {
334334
getTable(localResourceConfig),
335335
localResourceConfig.idAttribute
336336
])
337-
query.whereExists(subQuery);
337+
if (Object.keys(criteria).some(k => k.indexOf('|') > -1)) {
338+
query.orWhereExists(subQuery);
339+
} else {
340+
query.whereExists(subQuery);
341+
}
338342
criteria = null; // criteria handled by EXISTS subquery
339343
}
340344

0 commit comments

Comments
 (0)