public function getPersistentCollectionGenerator()
    {
        if (!isset($this->odmOptions['persistentCollectionGenerator'])) {
            $this->odmOptions['persistentCollectionGenerator'] = new DefaultPersistentCollectionGenerator(
                $this->getPersistentCollectionDir(),
                $this->getPersistentCollectionNamespace()
            );
        }

        return $this->odmOptions['persistentCollectionGenerator'];
    }