public function getByIds($ids, $prepareResults = true)
    {
        $queryBuilder = $this->getSelectQueryBuilder();
        $connection   = $queryBuilder->getConnection();
        $rows         = $queryBuilder->where(
            $queryBuilder->expr()->in($this->getUniqueId(), array_map(function ($id) use ($connection) {
                return $connection->quote($id);
            }, $ids))
        )->execute()->fetchAll();

        if ($prepareResults) {
            $this->prepareResults($rows);
        }

        return $rows;
    }
public function getByIds($ids, $prepareResults = true)
    {
        $queryBuilder = $this->getSelectQueryBuilder();
        $connection   = $queryBuilder->getConnection();
        $rows         = $queryBuilder->where(
            $queryBuilder->expr()->in($this->getUniqueId(), array_map(function ($id) use ($connection) {
                return $connection->quote($id);
            }, $ids))
        )->execute()->fetchAll();

        if ($prepareResults) {
            $this->prepareResults($rows);
        }

        return $rows;
    }
public function getByIds ( $ ids , $ prepareResults = true ) { $ queryBuilder = $ this -> getSelectQueryBuilder ( ) ; $ connection = $ queryBuilder -> getConnection ( ) ; $ rows = $ queryBuilder -> where ( $ queryBuilder -> expr ( ) -> in ( $ this -> getUniqueId ( ) , array_map ( function ( $ id ) use ( $ connection ) { return $ connection -> quote ( $ id ) ; } , $ ids ) ) ) -> execute ( ) -> fetchAll ( ) ; if ( $ prepareResults ) { $ this -> prepareResults ( $ rows ) ; } return $ rows ; }
Get by ID list

@param $ids
Get by ID list