File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1+ ##### 0.9.1 - 10 July 2015
2+
3+ ###### Backwards compatible bug fixes
4+ - Fix for loading relations in find() and findAll()
5+
16##### 0.9.0 - 10 July 2015
27
38###### Backwards compatible API changes
Original file line number Diff line number Diff line change @@ -208,11 +208,14 @@ module.exports =
208208 if ( containedName ) {
209209 ( function ( ) {
210210 var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
211+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
211212 __options = DSUtils . _ ( relationDef , __options ) ;
212213 DSUtils . remove ( __options [ 'with' ] , containedName ) ;
213214 DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
214215 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
215216 __options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
217+ } else {
218+ __options [ 'with' ] [ i ] = '' ;
216219 }
217220 } ) ;
218221
@@ -294,11 +297,14 @@ module.exports =
294297 if ( containedName ) {
295298 ( function ( ) {
296299 var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
300+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
297301 __options = DSUtils . _ ( relationDef , __options ) ;
298302 DSUtils . remove ( __options [ 'with' ] , containedName ) ;
299303 DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
300304 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
301305 __options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
306+ } else {
307+ __options [ 'with' ] [ i ] = '' ;
302308 }
303309 } ) ;
304310
Original file line number Diff line number Diff line change 11{
22 "name" : " js-data-sql" ,
33 "description" : " Postgres/MySQL/MariaDB/SQLite3 adapter for js-data." ,
4- "version" : " 0.9.0 " ,
4+ "version" : " 0.9.1 " ,
55 "homepage" : " http://www.js-data.io/docs/dssqladapter" ,
66 "repository" : {
77 "type" : " git" ,
1111 "name" : " Jason Dobry" ,
1212 "email" : " jason.dobry@gmail.com"
1313 },
14- "licenses" : [
15- {
16- "type" : " MIT" ,
17- "url" : " https://github.com/js-data/js-data-sql/blob/master/LICENSE"
18- }
19- ],
14+ "license" : " MIT" ,
2015 "main" : " ./dist/js-data-sql.js" ,
2116 "keywords" : [
2217 " data" ,
Original file line number Diff line number Diff line change @@ -156,11 +156,14 @@ class DSSqlAdapter {
156156 }
157157 if ( containedName ) {
158158 let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
159+ __options . with = options . with . slice ( ) ;
159160 __options = DSUtils . _ ( relationDef , __options ) ;
160161 DSUtils . remove ( __options . with , containedName ) ;
161162 DSUtils . forEach ( __options . with , ( relation , i ) => {
162163 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
163164 __options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
165+ } else {
166+ __options . with [ i ] = '' ;
164167 }
165168 } ) ;
166169
@@ -233,11 +236,14 @@ class DSSqlAdapter {
233236 }
234237 if ( containedName ) {
235238 let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
239+ __options . with = options . with . slice ( ) ;
236240 __options = DSUtils . _ ( relationDef , __options ) ;
237241 DSUtils . remove ( __options . with , containedName ) ;
238242 DSUtils . forEach ( __options . with , ( relation , i ) => {
239243 if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
240244 __options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
245+ } else {
246+ __options . with [ i ] = '' ;
241247 }
242248 } ) ;
243249
You can’t perform that action at this time.
0 commit comments