mongoose错误:不能使用$或与string

这是一个很奇怪的问题,我无法解决这个问题。 我的查询代码是这样的:

userTypeModel.find({$or: [{name: 'ADMIN'}, {name: 'SUPERADMIN'}], activeStatus: 1}, function (err, userTypeRow) { if (err) { flowController.emit('ERROR', {message: "Unable to Get details! Try again " + err, status: 'error', statusCode: '500'}); } else if (userTypeRow.length == 0) { flowController.emit('ERROR', {message: "No user-types available in the system yet!", status: 'error', statusCode: '404'}); } else { var adminId = null; var superAdminId = null; async.eachSeries(userTypeRow, function (element, callback) { if (element.name == 'ADMIN') { adminId = String(element._id); } if (element.name == 'SUPERADMIN') { superAdminId = String(element._id); } callback(); }, function (err) { if (err) { flowController.emit('ERROR', err); } else { flowController.emit('1', adminId, superAdminId); } }); } }); 

当我打电话给这个查询时,我得到了答复

 { "message": "ERROR WHILE GETTING USERS Error: Can't use $or with String.", "status": "error", "statusCode": "500" } 

我在MongoClient RoboMongo上面运行查询,它工作! 编程中查询中的问题在哪里?