Because the model shares the same underlying BSON::Document instance
as the query cache, when you change data on the model, the query cache
also changes. So if you do a find for the same model, you get a new
instance with mutated data which doesn't match the database.
This is particularly noticable as it relates to our releases
functionality, where documents loaded out of the database are
intentionally mutated, but not saved.
Because the model shares the same underlying
BSON::Document
instance as the query cache, when you change data on the model, the query cache also changes. So if you do a find for the same model, you get a new instance with mutated data which doesn't match the database.This is particularly noticable as it relates to our releases functionality, where documents loaded out of the database are intentionally mutated, but not saved.