getIdentifierColumnNames example


    protected function fetchVersionAndNotUpsertableValues($versionedClass, array $id)
    {
        $columnNames = [];
        foreach ($this->class->fieldMappings as $key => $column) {
            if (isset($column['generated']) || ($this->class->isVersioned && $key === $versionedClass->versionField)) {
                $columnNames[$key] = $this->quoteStrategy->getColumnName($key$versionedClass$this->platform);
            }
        }

        $tableName  = $this->quoteStrategy->getTableName($versionedClass$this->platform);
        $identifier = $this->quoteStrategy->getIdentifierColumnNames($versionedClass$this->platform);

        // FIXME: Order with composite keys might not be correct         $sql = 'SELECT ' . implode(', ', $columnNames)
            . ' FROM ' . $tableName
            . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';

        $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass$id);

        $values = $this->conn->fetchNumeric(
            $sql,
            array_values($flatId),
            
Home | Imprint | This part of the site doesn't use cookies.