fiware-sth-comet icon indicating copy to clipboard operation
fiware-sth-comet copied to clipboard

Use $setOnInsert and $set on the same property in update when MongoDB supports it

Open gtorodelvalle opened this issue 9 years ago • 0 comments

Currently, MongoDB does not support acting on the same property and update operation using the operators $setOnInsert and $set and consequently 2 update operations are needed. We should reduce it to 1 as soon as MongoDB supports it.

For more information see http://stackoverflow.com/questions/23992723/findandmodify-fails-with-error-cannot-update-field1-and-field1-at-the-same

gtorodelvalle avatar May 22 '15 11:05 gtorodelvalle