Python Driver
  1. Python Driver
  2. PYTHON-133

Ability to add additional fields to a DBRef

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • # Replies:
      1
    • Last comment by Customer:
      false

      Description

      As per this StackOverflow question:

      http://stackoverflow.com/questions/3056809/how-to-manually-create-a-dbref-using-pymongo/3059200#3059200

      It would be nice to be able to add additional fields to a DBRef to cache certain values from the document it references.

      Having the additional values passed as kwargs to the DBRef constructor would probably be the best way to achieve this, but having access to an "extra_fields" attribute wouldn't hurt either.

        Activity

        • Comments
        Hide
        auto
        added a comment -

        Author:

        {'login': 'mdirolf', 'name': 'Mike Dirolf', 'email': 'mike@10gen.com'}

        Message: Allow additional keys to be added to DBRef instances. PYTHON-133
        http://github.com/mongodb/mongo-python-driver/commit/6b0a9ccb62842f53b9f593f49f2b204532019efe

        Show
        auto
        added a comment - Author: {'login': 'mdirolf', 'name': 'Mike Dirolf', 'email': 'mike@10gen.com'} Message: Allow additional keys to be added to DBRef instances. PYTHON-133 http://github.com/mongodb/mongo-python-driver/commit/6b0a9ccb62842f53b9f593f49f2b204532019efe

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 43 weeks, 4 days ago
              Date of 1st Reply: