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

Can I access another field/property during Serialization?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Serialization

    Description

      Hello,
      I have been trying to figure out the best approach to encrypt specified properties using attributes and a custom Serializer. I am trying to figure out if there's a way to get other properties of the document during serialization so that I can encrypt the data using a key that is setup in the object? The key is generated at runtime.

      Here is a stack overflow link that has gone unanswered:
      https://stackoverflow.com/questions/48512543/mongodb-serialization-c-sharp-adding-additional-encrypted-field-properties

      I have also posted on the MongoDB Google group:
      https://groups.google.com/forum/#!topic/mongodb-user/qpwn2X11OL0

      Unless I'm mistaken, there's no possible way to accomplish this?

      Thank you

      Attachments

        Activity

          People

            wan.bachtiar@mongodb.com Wan Bachtiar
            amarwadi Anup Marwadi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: