MongoID dropping hash fields

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              CodeMonkeyKevin [X]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: