code: function(when, operation) {
      return function(values, callback) {
        var callbackName = when + operation;
  
        // Call type callback.
        if (callbackName in settings) {
          return settings[callbackName](settings, values, function() {
            // Invoke hook on all extensions.
            application.invoke(callbackName, name, values, callback);
          });
        }
  
        // Invoke hook on all extensions.
        application.invoke(callbackName, name, values, callback);
      };
    }
docs: Generate callbacks for all Waterline lifecycle callbacks.