On Tue, 21 Oct 2014 09:11:15 -0700, Domingo Alavarez Duarte wrote:
I was wrong about need to escape fields manually.
Yes. Another posibility, if values have different types (not only strings):
collection.update(
["_id": id], ["$set": [
["field1": value1.serializeToBson],
["field2": value2.serializeToBson],
["field3": value3.serializeToBson]
]]
);