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

Compatibility handling of Marshaled data? Mongoid 2 -> 3

    XMLWordPrintable

    Details

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

      Description

      Upgrading from Mongoid 2 to 3 I have run into some issues with Marshaled data. Mongoid 2 dumps Rails Model ids as BSON::ObjectId('4eef10a36c47dd2946000001') which on load under Mongoid 3 is no use and by default triggers an exception (i.e. when BSON is not defined).

      Is there a way you guys intend this transition to be handled?
      Even keeping BSON included in my Gemfile will still generate data that requires some conversion.

      Where this problem is likely the most common is in Rails apps using "remember me" cookies. I use Devise which gets caught by this, locking our any user with a remember me cookie. I have asked in the Devise project for ideas on how to transition smoothly from their POV. https://github.com/plataformatec/devise/issues/2202

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            eimermusic eimermusic
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: