Class | Mongoid::IdentityMap |
In: |
lib/mongoid/identity_map.rb
|
Parent: | Hash |
Set a document in the identity map for the provided selector.
@example Set the document in the map.
identity_map.set_selector(document, { :person_id => person.id })
@param [ Document ] document The document to set. @param [ Hash ] selector The selector to identify it.
@return [ Array<Document> ] The documents.
@since 2.2.0
Set a document in the identity map for the provided selector.
@example Set the document in the map.
identity_map.set_selector(document, { :person_id => person.id })
@param [ Document ] document The document to set. @param [ Hash ] selector The selector to identify it.
@return [ Document ] The matching document.
@since 2.2.0