Collection: Mongo Collection inconsitencies #133
jankapunkt
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Being that React Native is a client environment, I believe these behaviours are consistent with Meteor client side behavior. On the client, documents must be updated and removed by |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before opening many issues I'd like to collect some inconsistencies, which I found during testing.
With inconsistencies I mean behavior, which differs from the one in Meteor's Mongo.Collection and Mongo.Cursor implementations.
The first two I'd like to throw into the room:
collection.update
does only respect_id
as queryThis leads to only single documents being updated. In Meteor we can update multiple docs by given query.
collection.update
does not return the number of updated documentsIn Meteor there is always a number returned on how many documents were updated. In this case
update
will never do this, which is due to the previous mentioned behavior that only single documents can be updated.collection.remove
does not respect query to remove multiple documentsThis first came up during tests when I tried to clean a local collection for testing purposes.
Currently we can only remove a single doc, since internally
findOne
is used.General: Meteor 3.0 and async
Due to removal of fibers and an async api added to most collection functionality we should reflect this behavior as well. Meteor 3 is in alpha so we are good with starting to work on this, too.
Please add more you find and we will then figure out a good way to manage this. Please keep in mind
Beta Was this translation helpful? Give feedback.
All reactions