Method: Mongoid::Threaded#identity_map

Defined in:
lib/mongoid/threaded.rb

#identity_mapIdentityMap

Get the identity map off the current thread.

Examples:

Get the identity map.

Threaded.identity_map

Since:

  • 2.1.0



122
123
124
# File 'lib/mongoid/threaded.rb', line 122

def identity_map
  Thread.current[:"[mongoid]:identity-map"] ||= IdentityMap.new
end