-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minimongo use of undefined
doesn't match mongo shell
#1646
Comments
The use of So when you insert things with In general we do want minimongo's behavior to match Mongo's. Mongo's behavior with
even though when you put it in a BTW: if you
See how the We should probably try to make Minimongo match Mongo better, but frankly avoiding |
Thanks for the detailed response! I'll stay away from undefined! |
|
The Mongo Node driver that Meteor uses currently replaces `undefined` field values with `null`, when doing an insert/update. This approach can lead to unexpected behaviour, as outlined in meteor#1646, meteor#6051 and several other issues. This commit configures the default Mongo connection to `ignoreUndefined` fields, which means `undefined` fields are not inserted/updated, instead of being inserted/updated as `null`. Fixes meteor#6051.
* Ignore undefined fields when inserting/updating in Mongo The Mongo Node driver that Meteor uses currently replaces `undefined` field values with `null`, when doing an insert/update. This approach can lead to unexpected behaviour, as outlined in #1646, #6051 and several other issues. This commit configures the default Mongo connection to `ignoreUndefined` fields, which means `undefined` fields are not inserted/updated, instead of being inserted/updated as `null`. Fixes #6051. * Add PR link to History.md
Mini-mongo doesn't treat
undefined
in a $in lookup the same way as the server does. On the server it matches both null and undefined, but on the client it doesnt match any of them.The text was updated successfully, but these errors were encountered: