Fix updateOrCreate transaction propagation
This commit is contained in:
parent
d495a26a76
commit
17cac79b09
|
@ -505,7 +505,11 @@ DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data
|
|||
}
|
||||
});
|
||||
} else {
|
||||
Model.findOne({ where: ctx.query.where }, { notify: false }, function (err, inst) {
|
||||
var opts = {notify: false};
|
||||
if (ctx.options && ctx.options.transaction) {
|
||||
opts.transaction = ctx.options.transaction;
|
||||
}
|
||||
Model.findOne({where: ctx.query.where}, opts, function (err, inst){
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue