Entity/EntityRepository.php
public function getEntitiesById(array $ids, $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
    {
        return $this->getQueryBuilder(['id' => $ids])
            ->getQuery()
            ->execute(null, $hydrationMode);
    }
public function getEntitiesById(array $ids, $hydrationMode = AbstractQuery::HYDRATE_OBJECT)
    {
        return $this->getQueryBuilder(['id' => $ids])
            ->getQuery()
            ->execute(null, $hydrationMode);
    }
public function getEntitiesById ( array $ ids , $ hydrationMode = AbstractQuery :: HYDRATE_OBJECT ) { return $ this -> getQueryBuilder ( [ 'id' => $ ids ] ) -> getQuery ( ) -> execute ( null , $ hydrationMode ) ; }
Returns a list of entities extracted by their IDs.

@param array $ids
@param integer $hydrationMode
@return array
Returns a list of entities extracted by their IDs .