Query review time! Any concerns with this query? db.fleetmanagers.updateMany({…
- User
Query review time! Any concerns with this query?
db.fleetmanagers.updateMany({ "createdBy.name": "System", isCustomer: true, billingEmail: { ne: "" } }, [ { set: { alternativeEmailAddresses: { concatArrays: [ { alternativeEmailAddresses", []] }, [{ email: "$billingEmail", label: "" }] ], }, billingEmail: "", }, }, ] )
- Assistant
Your MongoDB
updateManyquery looks mostly correct and accomplishes the following: