如题,我在使用mongodb3.0.2 驱动2.0.27的updateOne方法时,对于官方给出的upsertedCount返回值,比较疑惑。 因为我实验后发现,matchedCount是官方实例中的1,但是upsertedCount却为0.下面是官方文档的连接。 http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#updateOne 有人知道具体原因吗?
如题,我在使用mongodb3.0.2 驱动2.0.27的updateOne方法时,对于官方给出的upsertedCount返回值,比较疑惑。 因为我实验后发现,matchedCount是官方实例中的1,但是upsertedCount却为0.下面是官方文档的连接。 http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#updateOne 有人知道具体原因吗?