Skip to content

Commit

Permalink
Add primary key on temp table (#9770)
Browse files Browse the repository at this point in the history
* add primary key on temp table;fixes #9768

* use all ID Columns in primary key
  • Loading branch information
wiseguy1394 authored Jun 2, 2022
1 parent 2197647 commit 768e2f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct(AST\Node $AST, $sqlWalker)
}

$this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ', PRIMARY KEY(' . implode(',', $idColumnNames) . '))';
$this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function __construct(AST\Node $AST, $sqlWalker)
}

$this->_createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ', PRIMARY KEY(' . implode(',', $idColumnNames) . '))';

$this->_dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
}
Expand Down

0 comments on commit 768e2f3

Please sign in to comment.