src/Doctrine/MongoDB/ElasticaToModelTransformer.php
protected function findByIdentifiers(array $identifierValues, $hydrate)
    {
        return $this->registry
            ->getManagerForClass($this->objectClass)
            ->getRepository($this->objectClass)
            ->{$this->options['query_builder_method']}($this->objectClass)
            ->field($this->options['identifier'])->in($identifierValues)
            ->hydrate($hydrate)
            ->getQuery()
            ->execute()
            ->toArray();
    }
protected function findByIdentifiers(array $identifierValues, $hydrate)
    {
        return $this->registry
            ->getManagerForClass($this->objectClass)
            ->getRepository($this->objectClass)
            ->{$this->options['query_builder_method']}($this->objectClass)
            ->field($this->options['identifier'])->in($identifierValues)
            ->hydrate($hydrate)
            ->getQuery()
            ->execute()
            ->toArray();
    }
Fetch objects for theses identifier values.

@param array $identifierValues ids values
@param bool  $hydrate          whether or not to hydrate the objects, false returns arrays

@return array of objects or arrays