ObjectId doesn't update

XMLWordPrintableJSON

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

      I just tried to update a ObjectId. But it just doesn't work. Here is what I am doing

      user = User.first
      user._id = BSON::ObjectId.new
      user.save!

      That returns true. But if I load the user again, it still has the old id. Is that a bug in mongoid? Or I am doing something wrong?

      Thanks.

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

                Created:
                Updated:
                Resolved: