db.getCollection('photos').findOneAndUpdate("5b028e71f32bd5004f905879",   //findByIdAndUpdate
{
'$push':{ 'orderHistory':{
"userId":"5b10d49320b805a7844ae5ec",
"customerId":"888888888888",
"createdOn":ISODate("2018-06-01T21:29:57.141+08:00")
}
}
},{
'upsert': true
})

相关文章:

  • 2021-12-05
  • 2021-12-29
  • 2022-12-23
  • 2021-12-05
  • 2022-01-01
  • 2022-12-23
  • 2021-10-26
  • 2021-12-05
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-07-08
  • 2021-11-27
  • 2021-11-21
相关资源
相似解决方案