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

created_at is nil, sometimes

      Sometimes, created_at gets saved as nil, while the rest of the model gets saved fine. Since created_at is just implemented using a before_create callback, I'm not sure how this could ever happen.

      Some thoughts:

      • It's only ever happened to one model, which does happen to be my largest collection
      • I have another field exclusively set in a before_create filter, and it's never set to nil

      Code looks something like this:

      m = MyModel.new
      
      # ... lots of mutation & additions to m (embedded & otherwise)
      
      m.touch 
      m.save!
      

      Running mongoid 3.1.4 w/ mongodb 2.4.4 in safe mode.

      Has anybody else experienced this?

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

              Created:
              Updated:
              Resolved: