docs: function(instance){
  			var serialized = this.serializeInstance(instance);
  			var id = this.id(instance);
  			var self = this;
  			if(id === undefined) {
  				// If `id` is undefined, we are creating this instance.
  				// It should be given a local id and temporarily added to the cidStore
  				// so other hooks can get back the instance that's being created.
  				var cid = this._cid++;
  				// cid is really a token to be able to reference this transaction.
  				this.cidStore.addReference(cid, instance);
  
  				// Call the data layer.
  				// If the data returned is undefined, don't call `createdInstance`
  				return this.createData(serialized, cid).then(function(data){
  					// if undefined is returned, this can't be created, or someone has taken care of it
  					if(data !== undefined) {
  						self.createdInstance(instance, data);
  					}
  					self.cidStore.deleteReference(cid, instance);
  					return instance;
  				});
  			} else {
  				return this.updateData(serialized).then(function(data){
  					if(data !== undefined) {
  						self.updatedInstance(instance, data);
  					}
  					return instance;
  				});
  			}
  		}