mongoid/mongoid — Issue #1459: Mongoid.without_identity_map
Author: yfeldblum
Created: 2011-11-29 22:40:40+00:00
State: open

There needs to be a way to opt out of the identity map in a block.

If the code is running in one of multiple threads, opting out of the identity map in a block in the one thread should not affect the identity map status of the other threads.

Mongoid.without_identity_map do
MyDocument.all.each do |doc|
doc.something_crazy!
end
end