From 0dd8f2b45a25260387a8c3fb96e95ab33edc5ca1 Mon Sep 17 00:00:00 2001 From: baozhoutao Date: Tue, 24 Dec 2024 18:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81'$addToSet'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/objectql/src/driver/meteorMongo.ts | 2 +- packages/objectql/src/driver/mongo.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/objectql/src/driver/meteorMongo.ts b/packages/objectql/src/driver/meteorMongo.ts index e79b0bb734..10db41cfba 100644 --- a/packages/objectql/src/driver/meteorMongo.ts +++ b/packages/objectql/src/driver/meteorMongo.ts @@ -432,7 +432,7 @@ export class SteedosMeteorMongoDriver implements SteedosDriver { const options = { $set: {} }; const keys = _.keys(data); _.each(keys, function (key) { - if (_.include(['$inc', '$min', '$max', '$mul', '$push'], key)) { + if (_.include(['$inc', '$min', '$max', '$mul', '$push', '$addToSet'], key)) { options[key] = data[key]; } else { options.$set[key] = data[key]; diff --git a/packages/objectql/src/driver/mongo.ts b/packages/objectql/src/driver/mongo.ts index 29eecefdcc..f128a1d2f8 100644 --- a/packages/objectql/src/driver/mongo.ts +++ b/packages/objectql/src/driver/mongo.ts @@ -348,7 +348,7 @@ export class SteedosMongoDriver implements SteedosDriver { const options = {$set: {}, $unset: {}}; const keys = _.keys(data); _.each(keys, function(key){ - if(_.include(['$inc','$min','$max','$mul', '$push'], key)){ + if(_.include(['$inc','$min','$max','$mul', '$push', '$addToSet'], key)){ options[key] = data[key]; }else{ if (null === data[key]) {