-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
I'm running into issues with the updated_at field not being set when upserting a document:
irb(main):001:0> class Foo; include Mongoid::Document; include Mongoid::Timestamps::Updated; field :foo, :type => String; end => #<Mongoid::Fields::Standard:0x007f58f50c96f8 @name="foo", @options={:type=>String, :klass=>Foo}, @label=nil, @default_val=nil> irb(main):002:0> f = Foo.new(:foo => "bar") => #<Foo _id: 53b5495d759b74db8d000002, updated_at: nil, foo: "bar"> irb(main):003:0> f.upsert => true irb(main):004:0> Foo.where(:foo => "bar").first => #<Foo _id: 53b5495d759b74db8d000002, updated_at: nil, foo: "bar">
I would expect an upsert to set this field. Is this the intended behaviour?