Merge pull request #13086 from nextcloud/bugfix/dont-query-when-id-not-null
Fetch lastInsertId only when id null
This commit is contained in:
commit
bb3a7ad275
|
@ -119,7 +119,9 @@ abstract class QBMapper {
|
|||
|
||||
$qb->execute();
|
||||
|
||||
$entity->setId((int) $qb->getLastInsertId());
|
||||
if($entity->id === null) {
|
||||
$entity->setId((int)$qb->getLastInsertId());
|
||||
}
|
||||
|
||||
return $entity;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue