[SERVER-40689] Collection find on ISODate Created: 17/Apr/19 Updated: 18/Apr/19 Resolved: 17/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Alex Aslan | Assignee: | Eric Sedor |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Does the ordering of "date", "timezone", "timezone_type" matters for an ISODate attribute matters on insert/find of a document?
We noticed that a find operation on an ISODate object that was inserted with timezone_type, date, timezone didn`t match any documents and when we switched the attribute order in the object to date, timezone_type, timezone it worked as expected.
Sample query used: db.test_col.find({to: { $gt: { date: "2019-04-17 13:45:07.000000", timezone_type: 1, timezone: "+00:00" }} }); |
| Comments |
| Comment by Eric Sedor [ 17/Apr/19 ] |
|
You can read about what to expect when querying for embedded documents here. We recommend starting out with questions like these by asking our community on the mongodb-user group or by posting on Stack Overflow with the mongodb tag. The SERVER project is for bugs and feature suggestions for the MongoDB server. |