           if not $rootScope.$$phase
             $rootScope.$apply()
         collection
-      collection.$finalize = (success=true) ->
+      collection.$finalize = (success=true, response=null) ->
         items_success = success
         collection.$_getPromiseForItems().then ( ->
           #collection.$meta.async.complete.deferred.resolve(collection)

        cache: req.cache
        headers: req.headers
        params: req.params
      ).then (response) =>
        res = @_transformResponse req, response
        @_fromRemote(res.data)
        @_postResponse res
      @

    # -----------------------------------------------------------------

        headers: req.headers
        params: req.params
        data: req.data
      ).then ((response) =>
        res = @_TransformResponse req, response
        item._fromRemote(res.data)
        @_PostResponse res
      ), (response) ->
        item.$error = response
        item.resolvePromise(item.$meta.async.direct.deferred, false)
        item.resolvePromise(item.$meta.async.m2o.deferred, false)
        item.resolvePromise(item.$meta.async.m2m.deferred, false)

      item

    ###*
