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

How to update document field with another field

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • Builders
    • None

    Description

      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

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            fomanlion@gmail.com yongxing Liang
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: