[SERVER-20129] $oid does not work with $ne Created: 26/Aug/15 Updated: 27/Aug/15 Resolved: 27/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Boris Petrov | Assignee: | Max Hirschhorn |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Sprint: | QuInt 8 08/28/15 | ||||||||
| Participants: | |||||||||
| Description |
|
These two queries return a different result (executed in the mongo shell):
The first one is correct and the second - wrong - it also returns the object with that ID. Am I missing something or is this a bug? |
| Comments |
| Comment by Max Hirschhorn [ 27/Aug/15 ] |
|
The server does not treat the object {"$oid": "55dda2e17da396655548870b"} as an ObjectId, but as a query on a "$oid" field. Of course we reject documents during insert that start with $, so this will not match anything. Closing this as a duplicate of |