[SERVER-14164] MongoDB: Too many positional (i.e. '$') elements found in path Created: 04/Jun/14 Updated: 10/Dec/14 Resolved: 02/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.0, 2.6.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeff Whelpley | Assignee: | Thomas Rueckstiess |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Run this query: db.post.update( { 'answers.comments.name': 'jeff' }, ) |
||||||||
| Participants: | |||||||||
| Description |
|
I just upgraded to Mongo 2.6.1 and one update statement that was working before is not returning an error. The update statement is:
The error I get is:
When I update an element just one level deep instead of two (i.e. answers.$.name instead of answers.$.comments.$.name), it works fine. If I downgrade my mongo instance below 2.6, it also works fine. |
| Comments |
| Comment by Jeff Whelpley [ 07/Jul/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry for not getting back to me. I was wrong before. multiple positional elements never worked. I will just wait for the feature. Thanks! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 02/Jul/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Jeff, I haven't heard back from you so I'm assuming this is no longer an issue. Please watch Regards, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thomas Rueckstiess [ 10/Jun/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Jeff, The feature you're requesting (i.e. multiple $ placeholders for nested arrays) is not currently implemented in MongoDB. There is an open feature request From your description it sounds like you were able to run this query on a version below 2.6. This should not be possible. I tried reproducing this on 2.4.10, and got an error (as expected). I generated some random data that I think matches your schema (please correct if wrong). Can you let me know if you notice any differences to what you did?
Regards, |