Skip to content

Commit

Permalink
Merge pull request #23 from jawira/no-pk
Browse files Browse the repository at this point in the history
Add support for tables without PK #21
  • Loading branch information
jawira authored Sep 8, 2021
2 parents 71fcb52 + f9a1b8e commit 9a3abbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Relational/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function generateHeaderAndFooter(): self

public function generateColumns(): self
{
$pkNames = $this->table->getPrimaryKeyColumns();
$pkNames = $this->table->hasPrimaryKey() ? $this->table->getPrimaryKeyColumns() : [];
$allColumns = $this->table->getColumns();

$pkOnly = function (DoctrineColumn $column) use ($pkNames): bool {
Expand Down

0 comments on commit 9a3abbd

Please sign in to comment.