[SERVER-29614] Permit $rename with a source that is a prefix of the destination or vice versa Created: 13/Jun/17  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying, Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Justin Seyster Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Execution
Participants:

 Description   

The current implementation of $rename prohibits any rename where the source and destination are along the same path: e.g., {$rename: {'a':'a.b'}} or {$rename: {'a.b':'a'}}. There is a TODO noting that it would be possible to relax this restriction.

If we do want to make that change, now would be a good time, as we are making backwards-incompatible changes to update functionality.



 Comments   
Comment by Asya Kamsky [ 29/Jun/19 ]

I believe this is possible with pipeline in update if someone wants to ... demote a field to be a child subfield of itself... Is there a use case anyone has asked us about - I don't think so, if so I'm inclined to close this won't fix.

Generated at Thu Feb 08 04:21:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.