[SERVER-1765] self referential updates? WAS: allow access to old row value during update Created: 09/Sep/10 Updated: 06/Dec/22 Resolved: 29/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | David Judd | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Do | Votes: | 37 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Query
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Right now, you can't access the old value of a row during an update. You have to decide what each field you want to update should look like on the client side. So you can't do: ... or any equivalent. You can do this kind of thing with two queries, but that has potential performance and concurrency problems. From what I know of the Mongo architecture I don't see why access to this information should be impossible. I don't know what the syntax would be, of course. See also my original email question: http://groups.google.com/group/mongodb-user/browse_thread/thread/1c7b424cf9ef48e8/877621f662ca4cc0 |
| Comments |
| Comment by Asya Kamsky [ 29/Jun/19 ] | |
|
You can see some examples here. This gives complete access to all existing fields in the document to make updates described in this ticket. | |
| Comment by zhouao [ 15/Sep/18 ] | |
|
这个问题提出快十年了,都没得到解决,mongodb开发组效率太低了。 | |
| Comment by Madhava Vinnakota [ 13/Apr/16 ] | |
|
This will be great feature to have! I hope it will be taken up soon! | |
| Comment by Reynaldo Enriquez [ 12/Nov/15 ] | |
|
Any update? Thanks in Advance!!! | |
| Comment by Jia Hongchao [ 16/Sep/15 ] | |
|
Any update? | |
| Comment by Ricardo Gonzalez [ 13/Aug/15 ] | |
|
This issue was created on 2010 | |
| Comment by David Parker [ 27/Sep/14 ] | |
|
I'm looking for this capability as well. Seems like it should be a fundamental feature with update. | |
| Comment by Yashika Ketan Gupta [ 02/Jun/14 ] | |
|
Whats the progress? Can we use/append/prepend a string to old value of field while updating that field?? | |
| Comment by Kevin J. Rice [ 11/Apr/13 ] | |
|
We're looking for this, too. In our document: doc = { ... 'keyname' : 'ABCDE' ... }We'd like to do the following as in-place modifications to strings:
| |
| Comment by Abdullah Battal [ 24/Mar/13 ] | |
|
Any progress on this issue? | |
| Comment by Eliot Horowitz (Inactive) [ 09/Sep/10 ] | |
|
We should make the syntax work for queries as well |