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

MongoID dropping hash fields

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None

      So updated the doc with ip_count hash:

      Field
      field :ip_count, :type => Hash, :default => {}

      MONGODB doc update
      ca_development['account'].update(

      {"_id"=>BSON::ObjectId('4d8ed14ebae81c589a000022')}

      , {"$set"=>{"ip_count"=>{"201103"=>{"127.0.0.1"=>1}}}})

      But when the doc is reloaded the data is gone!!

      ip_count: nil

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

              Created:
              Updated:
              Resolved: