loopback icon indicating copy to clipboard operation
loopback copied to clipboard

PersistedModel.updateAll Where filter does not work

Open mike-aungsan opened this issue 10 years ago • 21 comments

This does not work.

var whereFilter = {}
whereFilter.where = {'or': [ {'managerId': 'x001'},  {'managerId': 'x002'} ] }

Employee.updateAll(whereFilter, {managerId: 'x003'}, function(err, info) {
    ...
});

mike-aungsan avatar Dec 29 '15 00:12 mike-aungsan

you don't need to use where class here, you can directly use

 Employee.updateAll({ employee: 'test' }, { age: 32 }, function(err, data) {})

narenderv7 avatar Jun 04 '20 19:06 narenderv7