public function takeSnapshot()
    {
        if (is_array($this->originalReferencePaths)) {
            if ($this->isInitialized()) {
                foreach ($this->collection->toArray() as $document) {
                    try {
                        $this->originalReferencePaths[] = $this->dm->getUnitOfWork()->getDocumentId($document);
                    } catch (PHPCRException $e) {
                    }
                }
            } else {
                $this->originalReferencePaths = null;
            }
        }

        parent::takeSnapshot();
    }
public function takeSnapshot()
    {
        if (is_array($this->originalReferencePaths)) {
            if ($this->isInitialized()) {
                foreach ($this->collection->toArray() as $document) {
                    try {
                        $this->originalReferencePaths[] = $this->dm->getUnitOfWork()->getDocumentId($document);
                    } catch (PHPCRException $e) {
                    }
                }
            } else {
                $this->originalReferencePaths = null;
            }
        }

        parent::takeSnapshot();
    }
public function takeSnapshot ( ) { if ( is_array ( $ this -> originalReferencePaths ) ) { if ( $ this -> isInitialized ( ) ) { foreach ( $ this -> collection -> toArray ( ) as $ document ) { try { $ this -> originalReferencePaths [ ] = $ this -> dm -> getUnitOfWork ( ) -> getDocumentId ( $ document ) ; } catch ( PHPCRException $ e ) { } } } else { $ this -> originalReferencePaths = null ; } } parent :: takeSnapshot ( ) ; }
Reset original reference paths and mark the collection as non dirty.
Reset original reference paths and mark the collection as non dirty .