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

New Fields Break Old Documents

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:
      None

      Description

      Steps to reproduce:
      1. Create a model with a few fields
      2. Persist a few of these models
      3. Add a new field called "new_field"
      4. Try ModelName.first.new_field.

      Rather than returning nil for new_field on models created before new_field existed, it throws a method_missing exception. It should just return nil instead.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: