 
   @backedUp = {}
   schema: -> return @constructor.schema
-    
+
   getValidationErrors: ->
     errors = tv4.validateMultiple(@attributes, @constructor.schema or {}).errors
     return errors if errors?.length

      for error in errors
        console.debug "\t", error.dataPath, ":", error.message
      return errors
  
  save: (attrs, options) ->
    options ?= {}
    options.headers ?= {}


  applyDelta: (delta) ->
    newAttributes = $.extend(true, {}, @attributes)
    try
      jsondiffpatch.patch newAttributes, delta
    catch error
      console.error "Error applying delta", delta, "to attributes", newAttributes, error
    @set newAttributes

  getExpandedDelta: ->
