I'd like to clone a minimongo collection so I can do some calculations, get a result, then push those results back to the server.
Assuming this is a suitable pattern, how best can I clone a minimongo collection?
It appears that in the object no longer has a ._deepcopy
(1.0.4), and attempting an EJSON.clone
exceeds the callstack size for even tiny collections. Underscore's _.clone()
only copies by reference.
Alternatively, I could just edit the local collection via collection._collection.update
. But if that's the case, what would happen if on the off chance the server updated or removed a doc while it was processing? I watched this video, but am still unclear on that scenario: https://www.eventedmind.com/feed/meteor-how-does-the-client-synchronize-writes-with-the-server