Closed apmcodes closed 5 years ago
Solved directly using Sequelize model inside the hook, kind of hacky but works.
const listModel = context.app.service('lists').Model;
return listModel.increment(statUpdateFields, incOptions)
Events doesn't work with this way...
Trying to switch to sequelize from mongoose. Unable to replace mongoose $inc with sequelize increment method in a service patch.
Can alteritems be used to atomically increment a mysql field? If so can you guide.
https://github.com/feathers-plus/feathers-hooks-common/issues/226 http://docs.sequelizejs.com/class/lib/model.js~Model.html#static-method-increment