Allowed autoRefresh option to edit model method

- this allows us to disable auto-refresh in Bookshelf if we don't need
  an updated model, which saves an extra SQL query
This commit is contained in:
Daniel Lockyer 2023-03-22 10:46:29 +01:00 committed by Daniel Lockyer
parent 37383fde90
commit 45dcfa2032

View File

@ -41,7 +41,7 @@ module.exports = function (Bookshelf) {
case 'add':
return baseOptions.concat(extraOptions, ['autoRefresh']);
case 'edit':
return baseOptions.concat(extraOptions, ['id', 'require']);
return baseOptions.concat(extraOptions, ['id', 'require', 'autoRefresh']);
case 'findOne':
return baseOptions.concat(extraOptions, ['columns', 'require', 'mongoTransformer']);
case 'findAll':