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
+
1
6
##### 0.9.0 - 10 July 2015
2
7
3
8
###### Backwards compatible API changes
Original file line number Diff line number Diff line change @@ -208,11 +208,14 @@ module.exports =
208
208
if ( containedName ) {
209
209
( function ( ) {
210
210
var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
211
+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
211
212
__options = DSUtils . _ ( relationDef , __options ) ;
212
213
DSUtils . remove ( __options [ 'with' ] , containedName ) ;
213
214
DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
214
215
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
215
216
__options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
217
+ } else {
218
+ __options [ 'with' ] [ i ] = '' ;
216
219
}
217
220
} ) ;
218
221
@@ -294,11 +297,14 @@ module.exports =
294
297
if ( containedName ) {
295
298
( function ( ) {
296
299
var __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
300
+ __options [ 'with' ] = options [ 'with' ] . slice ( ) ;
297
301
__options = DSUtils . _ ( relationDef , __options ) ;
298
302
DSUtils . remove ( __options [ 'with' ] , containedName ) ;
299
303
DSUtils . forEach ( __options [ 'with' ] , function ( relation , i ) {
300
304
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
301
305
__options [ 'with' ] [ i ] = relation . substr ( containedName . length + 1 ) ;
306
+ } else {
307
+ __options [ 'with' ] [ i ] = '' ;
302
308
}
303
309
} ) ;
304
310
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " js-data-sql" ,
3
3
"description" : " Postgres/MySQL/MariaDB/SQLite3 adapter for js-data." ,
4
- "version" : " 0.9.0 " ,
4
+ "version" : " 0.9.1 " ,
5
5
"homepage" : " http://www.js-data.io/docs/dssqladapter" ,
6
6
"repository" : {
7
7
"type" : " git" ,
11
11
"name" : " Jason Dobry" ,
12
12
13
13
},
14
- "licenses" : [
15
- {
16
- "type" : " MIT" ,
17
- "url" : " https://github.com/js-data/js-data-sql/blob/master/LICENSE"
18
- }
19
- ],
14
+ "license" : " MIT" ,
20
15
"main" : " ./dist/js-data-sql.js" ,
21
16
"keywords" : [
22
17
" data" ,
Original file line number Diff line number Diff line change @@ -156,11 +156,14 @@ class DSSqlAdapter {
156
156
}
157
157
if ( containedName ) {
158
158
let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
159
+ __options . with = options . with . slice ( ) ;
159
160
__options = DSUtils . _ ( relationDef , __options ) ;
160
161
DSUtils . remove ( __options . with , containedName ) ;
161
162
DSUtils . forEach ( __options . with , ( relation , i ) => {
162
163
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
163
164
__options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
165
+ } else {
166
+ __options . with [ i ] = '' ;
164
167
}
165
168
} ) ;
166
169
@@ -233,11 +236,14 @@ class DSSqlAdapter {
233
236
}
234
237
if ( containedName ) {
235
238
let __options = DSUtils . deepMixIn ( { } , options . orig ? options . orig ( ) : options ) ;
239
+ __options . with = options . with . slice ( ) ;
236
240
__options = DSUtils . _ ( relationDef , __options ) ;
237
241
DSUtils . remove ( __options . with , containedName ) ;
238
242
DSUtils . forEach ( __options . with , ( relation , i ) => {
239
243
if ( relation && relation . indexOf ( containedName ) === 0 && relation . length >= containedName . length && relation [ containedName . length ] === '.' ) {
240
244
__options . with [ i ] = relation . substr ( containedName . length + 1 ) ;
245
+ } else {
246
+ __options . with [ i ] = '' ;
241
247
}
242
248
} ) ;
243
249
You can’t perform that action at this time.
0 commit comments