I'm using sequelize to save a dataset into a postgresql database. I have set up the isolation level to read uncommitted like that:
sequelize.transaction({
isolationLevel: sequelize.Transaction.ISOLATION_LEVELS.READ_UNCOMMITTED
},transaction => co(function* () {
...
}))
but after I have saved a data with id=X if I do a search for the same id i don't get any result
Model.findOne({ where }, transaction);
Do somebody has any suggestion?
Yeah. You use a wrong signature. It should be
Model.findOne({ where, transaction })
. See http://docs.sequelizejs.com/class/lib/model.js~Model.html#static-method-findOne
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With