We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1eb1f7 commit ba2f797Copy full SHA for ba2f797
lib/public/AppFramework/Db/QBMapper.php
@@ -116,10 +116,12 @@ public function insert(Entity $entity): Entity {
116
/** @psalm-suppress DocblockTypeContradiction */
117
$entity->setId();
118
$qb->executeStatement();
119
- } else {
+ } elseif ($entity->getId() === null) {
120
121
// When autoincrement is used id is always an int
122
$entity->setId($qb->getLastInsertId());
123
+ } else {
124
+ $qb->executeStatement();
125
}
126
return $entity;
127
0 commit comments