Skip to content

Commit

Permalink
- keep the original PK value is it is set
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Jul 16, 2019
1 parent 75a0ec9 commit 5eac813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mapper/DatabaseMapper.php
Expand Up @@ -96,7 +96,7 @@ public function queueCreate($entity, Node $node, State $state): ContextCarrierIn
$state->setStatus(Node::SCHEDULED_INSERT);
$state->setData($columns);

$columns[$this->primaryKey] = $this->nextPrimaryKey();
$columns[$this->primaryKey] = $columns[$this->primaryKey] ?? $this->nextPrimaryKey();
if ($columns[$this->primaryKey] === null) {
unset($columns[$this->primaryKey]);
}
Expand Down

0 comments on commit 5eac813

Please sign in to comment.