Hi @Lethe
There’s no way to put several fields at once on the JsonObject
currently, so you’d have to set changed fields individually (iterate on your JsonObject that holds only diffs using getNames()
, put
these values, maybe recursively)…
This kind of code could be made part of the JsonObject
API though (and if you’re willing to contribute, feel very welcome to do so )
It can be kind of an overkill but for now there’s now way around it: when you mutate a document, you have to transmit the whole new version of the document to the server (that’s in the protocol).
in the future the protocol will evolve to authorize sub-document granularity for mutations