Consider the following example:
require 'mongoid'
class Car
include Mongoid::Document
field :make, type: String
end
Car.where(:make => "Toyota").build
- => #<Car _id: 4fe08a81bb21c7ba19000001, _type: nil, make: "Toyota">
Car.where(:make => "Toyota").new - => #<Car _id: 4fe08a81bb21c7ba19000002, _type: nil, make: nil>
On Many and ManyToMany relations, #new is aliased to #build, but not on Criteria, which makes the behaviour confusing.
I get the same results with Mongoid 2.4.10 and 3.0.0.rc.