Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-497

SONManipulator manipulates object before save, when perhaps it could manipulate a copy instead?

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.4.2
    • Component/s: None
    • Labels:
      None

      Consider the attached test case. I am probably wrong.. but to me it's annoying that a SONManipulator alters my object, instead of a copy of it. When I save a document, I want my document object to stay the same in memory except for the addition of an '_id' where appropriate. Maybe I'm doing something wrong?

        1. test.py
          1.0 kB

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            mattbodman Matt Bodman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: