code: function attach(crudifyAction, dbAction, aliases) {
      if (!crudifyAction.templates) return;
      crudifyAction.templates.forEach((t) => {
        dbAction.template(t);
      });
      delete crudifyAction.templates;
      // attach all middlewares.
      crudifyAction.handlers.forEach((item) => {
        if (typeof dbAction[item.fn] !== 'function') return;
        dbAction[item.fn].apply(dbAction, item.args);
      });
      delete crudifyAction.handlers;
      // attach aliases.
      aliases.forEach((args) => {
        dbAction.alias.apply(dbAction, args);
      });
    }
docs: /* Attach the stuff to the new action