Skip to content

Commit

Permalink
Stable Version 0.5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Jul 11, 2015
1 parent 3d72607 commit 14557d6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
##### 0.5.1 - 10 July 2015

###### Backwards compatible bug fixes
- Fix for loading relations in find() and findAll()

##### 0.5.0 - 10 July 2015

Upgraded dependencies
Expand Down
6 changes: 6 additions & 0 deletions dist/js-data-mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,14 @@ module.exports =
if (containedName) {
(function () {
var __options = DSUtils.deepMixIn({}, options.orig ? options.orig() : options);
__options['with'] = options['with'].slice();
__options = DSUtils._(relationDef, __options);
DSUtils.remove(__options['with'], containedName);
DSUtils.forEach(__options['with'], function (relation, i) {
if (relation && relation.indexOf(containedName) === 0 && relation.length >= containedName.length && relation[containedName.length] === '.') {
__options['with'][i] = relation.substr(containedName.length + 1);
} else {
__options['with'][i] = '';
}
});

Expand Down Expand Up @@ -402,11 +405,14 @@ module.exports =
if (containedName) {
(function () {
var __options = DSUtils.deepMixIn({}, options.orig ? options.orig() : options);
__options['with'] = options['with'].slice();
__options = DSUtils._(relationDef, __options);
DSUtils.remove(__options['with'], containedName);
DSUtils.forEach(__options['with'], function (relation, i) {
if (relation && relation.indexOf(containedName) === 0 && relation.length >= containedName.length && relation[containedName.length] === '.') {
__options['with'][i] = relation.substr(containedName.length + 1);
} else {
__options['with'][i] = '';
}
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-mongodb",
"description": "MongoDB adapter for js-data.",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "http://www.js-data.io/docs/dsmongodbadapter",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,14 @@ class DSMongoDBAdapter {
}
if (containedName) {
let __options = DSUtils.deepMixIn({}, options.orig ? options.orig() : options);
__options.with = options.with.slice();
__options = DSUtils._(relationDef, __options);
DSUtils.remove(__options.with, containedName);
DSUtils.forEach(__options.with, (relation, i) => {
if (relation && relation.indexOf(containedName) === 0 && relation.length >= containedName.length && relation[containedName.length] === '.') {
__options.with[i] = relation.substr(containedName.length + 1);
} else {
__options.with[i] = '';
}
});

Expand Down Expand Up @@ -333,11 +336,14 @@ class DSMongoDBAdapter {
}
if (containedName) {
let __options = DSUtils.deepMixIn({}, options.orig ? options.orig() : options);
__options.with = options.with.slice();
__options = DSUtils._(relationDef, __options);
DSUtils.remove(__options.with, containedName);
DSUtils.forEach(__options.with, (relation, i) => {
if (relation && relation.indexOf(containedName) === 0 && relation.length >= containedName.length && relation[containedName.length] === '.') {
__options.with[i] = relation.substr(containedName.length + 1);
} else {
__options.with[i] = '';
}
});

Expand Down

0 comments on commit 14557d6

Please sign in to comment.