           (status,response,isSuccess)=>
             if isSuccess
               @_setStatus 'deleted'
+              @destroy()
               success?()
             else
               @_setStatus 'error'

    return

  Resource::parseCollectionResponse = (response,collection)->
    jsonObjs = JSON.parse response
    collection.add (@transform obj for obj in jsonObjs)
    return

        return
    inst

  Resource::query = (params,success,error,inst)->
    inst ?= new @Collection @
    http
      method: 'GET'
      url: @genUrl params, false
