Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3677

How to update document field with another field

    • Type: Icon: New Feature New Feature
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Builders
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Currently I can use UpdateBuilder to update document,but  how can I tell it use value of field B o update field A?

       

      // code placeholder
      
      var builder = Builders<T>.Update; 
      //Seems builder.Set("A","$B");
      // will update value of field 'A' to be '$B', but not the value of field B

       

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            fomanlion@gmail.com yongxing Liang
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: