fiware-sth-comet
fiware-sth-comet copied to clipboard
Use $setOnInsert and $set on the same property in update when MongoDB supports it
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