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?

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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?

        Attachments

        1. test.py
          1.0 kB

          Activity

            People

            Assignee:
            behackett Bernie Hackett
            Reporter:
            mattbodman Matt Bodman
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: