# File lib/mongo_mapper/plugins/identity_map.rb, line 123 def find_one(opts={}) query = clone.amend(opts) if identity_map && query.simple? && (document = identity_map.get_from_identity_map(query[:_id])) document else super.tap do |doc| doc.remove_from_identity_map if doc && query.fields? end end end