protected function getAssoc($query, $parameters = [])
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);

        $resultSet = $database->select($query, $parameters);

        $rows = $resultSet->fetchAll();

        if (!$rows) {
            return [];
        }

        $result = [];

        foreach ($rows as $row) {
            $firstColumn = array_keys($row)[0];
            $key = $row[$firstColumn];

            $values = array_values($row);

            if (2 <= count($values)) {
                $result[$key] = $values[1];
            }
        }

        return $result;
    }