Manually query for the last id
This commit is contained in:
parent
f4186d3dfc
commit
ac8941f6ac
1 changed files with 11 additions and 1 deletions
|
@ -859,7 +859,17 @@ class ShareesTest extends TestCase {
|
|||
])
|
||||
->setParameter('expiration', null, 'datetime')
|
||||
->execute();
|
||||
return $connection->lastInsertId('share');
|
||||
|
||||
$queryBuilder = $connection->getQueryBuilder();
|
||||
$query = $queryBuilder->select('id')
|
||||
->from('share')
|
||||
->orderBy('id', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->execute();
|
||||
$share = $query->fetch();
|
||||
$query->closeCursor();
|
||||
|
||||
return (int) $share['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue