Skip to content

Commit baf36bb

Browse files
committed
0.2.2
1 parent 5bc03c3 commit baf36bb

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 0.2.2 - 12 March 2016
2+
3+
Added support for filtering on "with" sub queries
4+
15
##### 0.2.1 - 10 March 2016
26

37
Fix for localKeys

dist/js-data-adapter.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js-data-adapter.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-adapter",
33
"description": "Base adapter class that all other js-data adapters extend.",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"homepage": "https://github.com/js-data/js-data-adapter",
66
"repository": {
77
"type": "git",
@@ -31,16 +31,16 @@
3131
"ci": "npm run test && cat coverage/lcov.info | coveralls || true"
3232
},
3333
"peerDependencies": {
34-
"js-data": "^3.0.0-alpha.16"
34+
"js-data": "^3.0.0-alpha.18"
3535
},
3636
"devDependencies": {
37-
"babel-core": "6.7.0",
38-
"babel-polyfill": "6.6.1",
37+
"babel-core": "6.7.2",
38+
"babel-polyfill": "6.7.2",
3939
"babel-preset-es2015-rollup": "1.1.1",
4040
"chai": "3.5.0",
4141
"coveralls": "2.11.8",
4242
"istanbul": "0.4.2",
43-
"js-data-adapter-tests": "^2.0.0-alpha.14",
43+
"js-data-adapter-tests": "^2.0.0-alpha.15",
4444
"js-data-repo-tools": "0.2.0",
4545
"mocha": "2.4.5",
4646
"rollup": "0.25.4",

src/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {utils} from 'js-data'
22

33
const {
44
addHiddenPropsToTarget,
5+
deepFillIn,
56
extend,
67
fillIn,
78
forEachRelation,
@@ -1051,6 +1052,17 @@ addHiddenPropsToTarget(Adapter.prototype, {
10511052

10521053
let records = []
10531054
let op
1055+
const activeWith = opts._activeWith
1056+
1057+
if (isObject(activeWith)) {
1058+
const activeQuery = activeWith.query || {}
1059+
if (activeWith.replace) {
1060+
query = activeQuery
1061+
} else {
1062+
deepFillIn(query, activeQuery)
1063+
}
1064+
}
1065+
10541066
// beforeFindAll lifecycle hook
10551067
op = opts.op = 'beforeFindAll'
10561068
return resolve(self[op](mapper, query, opts)).then(function () {

0 commit comments

Comments
 (0)