Merge pull request #13278 from nextcloud/backport/13086/stable15

[stable15] Fetch lastInsertId only when id null
This commit is contained in:
Roeland Jago Douma 2019-01-02 09:15:28 +01:00 committed by GitHub
commit 832fa63dec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}