Skip to content

Commit 8751f4f

Browse files
committed
Stable Version 0.11.14
1 parent 0f01ff3 commit 8751f4f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

dist/js-data-sql.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,13 @@ module.exports =
426426
// Perform `WHERE EXISTS` subquery for hasMany property
427427
var existsParams = _defineProperty({}, parts[0], criteria);
428428
var subQuery = _this7.filterQuery(relationResourceConfig, existsParams, options).whereRaw('??.??=??.??', [getTable(relationResourceConfig), relation.foreignKey, getTable(localResourceConfig), localResourceConfig.idAttribute]);
429-
query.whereExists(subQuery);
429+
if (Object.keys(criteria).some(function (k) {
430+
return k.indexOf('|') > -1;
431+
})) {
432+
query.orWhereExists(subQuery);
433+
} else {
434+
query.whereExists(subQuery);
435+
}
430436
criteria = null; // criteria handled by EXISTS subquery
431437
}
432438

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-sql",
33
"description": "Postgres/MySQL/MariaDB/SQLite3 adapter for js-data.",
4-
"version": "0.11.13",
4+
"version": "0.11.14",
55
"homepage": "http://www.js-data.io/docs/dssqladapter",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)