src/Attribute/TranslatedReference.php
protected function fetchExistingIdsFor($idList, $langCode)
    {
        $queryBuilder = $this
            ->connection
            ->createQueryBuilder()
            ->select('item_id')
            ->from($this->getValueTable());
        $this->buildWhere($queryBuilder, $idList, $langCode);

        $statement = $queryBuilder->execute();

        return $statement->fetchAll(\PDO::FETCH_COLUMN);
    }
protected function fetchExistingIdsFor($idList, $langCode)
    {
        $queryBuilder = $this
            ->connection
            ->createQueryBuilder()
            ->select('item_id')
            ->from($this->getValueTable());
        $this->buildWhere($queryBuilder, $idList, $langCode);

        $statement = $queryBuilder->execute();

        return $statement->fetchAll(\PDO::FETCH_COLUMN);
    }
Filter the item ids for ids that exist in the database.

@param array  $idList   The id list.
@param string $langCode The language code.

@return string[]