KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to update a single document by passing two $inc operators in a single update document? For example, I am trying to increment two different fields in a given document using the following update document: { "$inc" : { "ViewAggregates.4d75b891842f2d3930cf7674" : 1 }, "$inc" : { "ViewAggregates.Total" : 1 } } No errors are thrown and the document is updated but only one of the fields has been incremented. It is as if the server disregarded the first $inc operator and only the second was actually applied. Is this the intended\correct behavior or is there something I am missing?
Tags (comma-separated)
Save Edits
Cancel