File tree 4 files changed +18
-1
lines changed
4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ ##### 0.5.1 - 10 July 2015
2
+
3
+ ###### Backwards compatible bug fixes
4
+ - Fix for loading relations in find() and findAll()
5
+
1
6
##### 0.5.0 - 10 July 2015
2
7
3
8
Upgraded dependencies
Original file line number Diff line number Diff line change @@ -307,11 +307,14 @@ module.exports =
307
307
if ( containedName ) {
308
308
( function ( ) {
309
309
var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
310
+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
310
311
__options = DSUtils . _ ( relationDef , __options ) ;
311
312
DSUtils . remove ( __options [ 'with' ] , containedName ) ;
312
313
DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
313
314
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
314
315
__options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
316
+ } else {
317
+ __options [ 'with' ] [ i ] = '' ;
315
318
}
316
319
} ) ;
317
320
@@ -402,11 +405,14 @@ module.exports =
402
405
if ( containedName ) {
403
406
( function ( ) {
404
407
var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
408
+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
405
409
__options = DSUtils . _ ( relationDef , __options ) ;
406
410
DSUtils . remove ( __options [ 'with' ] , containedName ) ;
407
411
DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
408
412
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
409
413
__options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
414
+ } else {
415
+ __options [ 'with' ] [ i ] = '' ;
410
416
}
411
417
} ) ;
412
418
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " js-data-mongodb" ,
3
3
"description" : " MongoDB adapter for js-data." ,
4
- "version" : " 0.5.0 " ,
4
+ "version" : " 0.5.1 " ,
5
5
"homepage" : " http://www.js-data.io/docs/dsmongodbadapter" ,
6
6
"repository" : {
7
7
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -245,11 +245,14 @@ class DSMongoDBAdapter {
245
245
}
246
246
if ( containedName ) {
247
247
let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
248
+ __options . with = options . with . slice ( ) ;
248
249
__options = DSUtils . _ ( relationDef , __options ) ;
249
250
DSUtils . remove ( __options . with , containedName ) ;
250
251
DSUtils . forEach ( __options . with , ( relation , i ) => {
251
252
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
252
253
__options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
254
+ } else {
255
+ __options . with [ i ] = '' ;
253
256
}
254
257
} ) ;
255
258
@@ -333,11 +336,14 @@ class DSMongoDBAdapter {
333
336
}
334
337
if ( containedName ) {
335
338
let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
339
+ __options . with = options . with . slice ( ) ;
336
340
__options = DSUtils . _ ( relationDef , __options ) ;
337
341
DSUtils . remove ( __options . with , containedName ) ;
338
342
DSUtils . forEach ( __options . with , ( relation , i ) => {
339
343
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
340
344
__options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
345
+ } else {
346
+ __options . with [ i ] = '' ;
341
347
}
342
348
} ) ;
343
349
You can’t perform that action at this time.
0 commit comments