MongoMapper (or more accurately, Plucky, the library that builds MongoMapper queries) casts a field called id
to _id
automatically for parity with ActiveRecord, so you can't use two different fields called _id
and id
. You'll see that if you look at the generated query in your logs.
In this case, you'd want to use a different field name.