@@ -2580,7 +2580,11 @@ function DSLocalStorageAdapterProvider() {
25802580 */
25812581 update : function ( resourceConfig , id , attrs , options ) {
25822582 options = options || { } ;
2583- return this . PUT ( DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . getEndpoint ( id , options ) , id ) , attrs ) ;
2583+ var _this = this ;
2584+ return _this . find ( resourceConfig , id , options ) . then ( function ( item ) {
2585+ DSUtils . deepMixIn ( item , attrs ) ;
2586+ return _this . PUT ( DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . getEndpoint ( id , options ) , id ) , item ) ;
2587+ } ) ;
25842588 } ,
25852589
25862590 /**
@@ -3977,7 +3981,7 @@ function errorPrefix(resourceName) {
39773981 *
39783982 * DS.filter('document', params); // []
39793983 *
3980- * DS.updateAll('document', 5, {
3984+ * DS.updateAll('document', {
39813985 * author: 'Sally'
39823986 * }, params).then(function (documents) {
39833987 * documents; // The documents that were updated via an adapter
@@ -4081,8 +4085,6 @@ module.exports = updateAll;
40814085} , { } ] , 67 :[ function ( require , module , exports ) {
40824086var observe = require ( '../../lib/observe-js/observe-js' ) ;
40834087
4084- var total = 0 ;
4085-
40864088function lifecycleNoop ( resourceName , attrs , cb ) {
40874089 cb ( null , attrs ) ;
40884090}
@@ -4105,6 +4107,8 @@ Defaults.prototype.defaultFilter = function (collection, resourceName, params, o
41054107 sort : ''
41064108 } ;
41074109
4110+ params = params || { } ;
4111+
41084112 if ( _this . utils . isObject ( params . where ) ) {
41094113 where = params . where ;
41104114 } else {
0 commit comments