Manually query for the last id

This commit is contained in:
Joas Schilling 2015-08-19 12:06:00 +02:00
parent f4186d3dfc
commit ac8941f6ac

View file

@ -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'];
}
/**