code: function wrappedCallback(success) {
        if (success) {
          // Merge any changes into attributes and clear changes.
          self.merge(self.changes).reset();
          // Add/remove from collection if persist was successful.
          manageCollection();
          // Trigger the event before executing the callback.
          self.emit(method);
        }
  
        // Store the return value of the callback.
        var value;
        // Run the supplied callback.
        if (callback) value = callback.apply(self, arguments);
  
        return value;
      }
docs: **
  Wrap the existing callback in this function so we always manage the
  collection and emit events from here rather than relying on the
  persist adapter to do it for us. The persist adapter is
  only required to execute the callback with a single argument - a
  boolean to indicate whether the call was a success - though any
  other arguments will also be forwarded to the original callback.