-
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
Mongo $ne fails on the client when there are multiple items in a sub collection #1451
Comments
Thanks for the report. Yeah, the precise semantics of how Mongo selectors interact with arrays (not to mention, eg, multiple levels of arrays) is undocumented and varies from selector type to selector type. eg, for some things, I know that Mongo is rewriting the matcher for 2.5 and I think they may be doing it in a way that makes their code easier to understand. Taking a look at that might help us do better at accurately implementing array queries. |
As a workaround how would you go about removing the items in the same way the $ne would? |
As a work around I'm adding the userid like this: Test.update({_id: testid_1}, {
$push: { userid: "CZskWsJymrqwrdWjT" }}); Then $ne works |
I think that you can actually use I am going to try to fix @larssonp-tmg is correct that we currently handle this inconsistently based on whether the array is the bottom level of the key or a higher level. |
Oops, my workaround does not work. |
Put this in your startup:
On the client console:
On the server, either through minimongo or using a meteor server side method:
The text was updated successfully, but these errors were encountered: