Check if MongoDB upsert did an insert or an update

前端 未结 5 989
自闭症患者
自闭症患者 2020-12-03 09:26

I can\'t find this in the documentation in any of the obvious places. I\'d like to know if it is possible to know if Mongo executed an insert or update in the upsert operati

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-03 09:52

    The Answer was taken from "MongoDB Applied Design Patterns" Book !determine whether an upsert was an insert or an update

提交回复
热议问题