[SERVER-21153] Array Field Limitations and Positional Update Created: 27/Oct/15 Updated: 27/Oct/15 Resolved: 27/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.0.7 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Critical - P2 |
| Reporter: | efkan turen | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
node-mongodb-native v2.0.42 is used on Node.js on Windows 10 |
||
| Participants: |
| Description |
|
I've been trying to do important update operations using two-phase commit method. Unfortunately, the field that will be updated in an array. But the same document have to has a pendingTransactions field to store the current transactions. And MongoDB doesn't support positional update Is there any chance to solve this situation? Other Additional informations and 'Correct Results' When Two Array Fields Are In The QueryActually I used a second array in query document without knowing the problem. It works stable. When testing, encountered with the problem at another update operation. So, the first query response correctly every time. There is a documentation is related array field limitation. the stable part is like the below [javascript]. With $ne operator it works correct;
the unstable part is like the below. ;
|
| Comments |
| Comment by Ramon Fernandez Marina [ 27/Oct/15 ] |
|
Thanks for your report efkan. As you point out this is an existing limitation of the positional operator, so you may want to explore other options, perhaps using aggregation. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources. Regards, |