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

$inc operator not updating the updated_at timestamp

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Is this by design?

      I'm performing this query:

      Activity.where(

      {"object.id" => @likeable.id}

      ).inc("object.nlikes", 1)

      The update is happening just fine, but the timestamp is not changed, so my subsequent queries which query by "updated_at" don't "see" this change.

      Using Mongod 2.2 and Mongoid 3.1.4

      Thanks!

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

              Created:
              Updated:
              Resolved: