File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Expand file tree Collapse file tree 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+
16##### 0.5.0 - 10 July 2015
27
38Upgraded dependencies
Original file line number Diff line number Diff line change @@ -307,11 +307,14 @@ module.exports =
307307 if ( containedName ) {
308308 ( function ( ) {
309309 var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
310+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
310311 __options = DSUtils . _ ( relationDef , __options ) ;
311312 DSUtils . remove ( __options [ 'with' ] , containedName ) ;
312313 DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
313314 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
314315 __options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
316+ } else {
317+ __options [ 'with' ] [ i ] = '' ;
315318 }
316319 } ) ;
317320
@@ -402,11 +405,14 @@ module.exports =
402405 if ( containedName ) {
403406 ( function ( ) {
404407 var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
408+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
405409 __options = DSUtils . _ ( relationDef , __options ) ;
406410 DSUtils . remove ( __options [ 'with' ] , containedName ) ;
407411 DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
408412 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
409413 __options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
414+ } else {
415+ __options [ 'with' ] [ i ] = '' ;
410416 }
411417 } ) ;
412418
Original file line number Diff line number Diff line change 11{
22 "name" : " js-data-mongodb" ,
33 "description" : " MongoDB adapter for js-data." ,
4- "version" : " 0.5.0 " ,
4+ "version" : " 0.5.1 " ,
55 "homepage" : " http://www.js-data.io/docs/dsmongodbadapter" ,
66 "repository" : {
77 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -245,11 +245,14 @@ class DSMongoDBAdapter {
245245 }
246246 if ( containedName ) {
247247 let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
248+ __options . with = options . with . slice ( ) ;
248249 __options = DSUtils . _ ( relationDef , __options ) ;
249250 DSUtils . remove ( __options . with , containedName ) ;
250251 DSUtils . forEach ( __options . with , ( relation , i ) => {
251252 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
252253 __options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
254+ } else {
255+ __options . with [ i ] = '' ;
253256 }
254257 } ) ;
255258
@@ -333,11 +336,14 @@ class DSMongoDBAdapter {
333336 }
334337 if ( containedName ) {
335338 let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
339+ __options . with = options . with . slice ( ) ;
336340 __options = DSUtils . _ ( relationDef , __options ) ;
337341 DSUtils . remove ( __options . with , containedName ) ;
338342 DSUtils . forEach ( __options . with , ( relation , i ) => {
339343 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
340344 __options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
345+ } else {
346+ __options . with [ i ] = '' ;
341347 }
342348 } ) ;
343349
You can’t perform that action at this time.
0 commit comments