Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1289

Older "versions" store ObjectIDs instead of "key" field's value

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      From the model:

      field :user_id, type: String, versioned: false
      key :user_id

      In the DB:

      [
      {
      "_id": "248193",
      "user_id": "248193",
      "version": 4,
      "versions": [

      { "_id": "4e7f52804ce45b1a4a000002", "version": 1 }

      ,

      { "_id": "4e7f57404ce45b1edc000002", "version": 2 }

      ,

      { "_id": "4e7f57404ce45b1edc000004", "version": 3 }

      ]
      }
      ]

      a) Aren't revisions expected to store previous ID itself?

      b) How can _id field be excluded from versioning?

            Assignee:
            Unassigned Unassigned
            Reporter:
            Gurpartap Gurpartap [X]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: