public function isDocumentInDocumentPool($document)
    {
        if ($document instanceof Document) {
            $document = $document->getId();
        }

        return isset($this->documentPool[(string) $document]);
    }
public function isDocumentInDocumentPool($document)
    {
        if ($document instanceof Document) {
            $document = $document->getId();
        }

        return isset($this->documentPool[(string) $document]);
    }
public function isDocumentInDocumentPool ( $ document ) { if ( $ document instanceof Document ) { $ document = $ document -> getId ( ) ; } return isset ( $ this -> documentPool [ ( string ) $ document ] ) ; }
Check if document exists in identity map

@param \Sokil\Mongo\Document|\MongoId|int|string $document Document instance or it's id
@return boolean
Check if document exists in identity map