[SERVER-2367] Object.property doesn't work with ObjectId in querying Created: 17/Jan/11 Updated: 17/Mar/11 Resolved: 17/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Xiang.Song | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu php 5.3.3 php-mongo 1.10 mongodb 1.6.5-stable |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
Querying an document like {str: 'something', obj: {sub1: ObjectId('123'), sub2: 456}} returns nothing while pure strings or integers works well Mon Jan 17 19:01:06 [conn2349] query: gaoren.test { obj.sub1: ObjectId('4d3421722973eb6246140000') }Mon Jan 17 19:01:06 [conn2349] used cursor: 0x15de360 Mon Jan 17 19:01:06 [conn2349] query: gaoren.test { obj.sub2: 456 }Mon Jan 17 19:01:06 [conn2349] used cursor: 0x168a5c0 Mon Jan 17 19:01:06 [conn2349] query: gaoren.test{ obj: { $elemMatch: { sub1: ObjectId('4d3421722973eb6246150000'), sub2: 456 } } } |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 17/Jan/11 ] |
|
Seems to work fine for me: ) } ) } ) } Can you provide a full non-working example. The snippet you send it not full. |
| Comment by Xiang.Song [ 17/Jan/11 ] |
|
This problem occurs occasionally right after updating. |