mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
Merge pull request #13278 from nextcloud/backport/13086/stable15
[stable15] Fetch lastInsertId only when id null
This commit is contained in:
commit
832fa63dec
1 changed files with 3 additions and 1 deletions
|
|
@ -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 a new issue