for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Sequencing\Generator;
use Doctrine\ORM\EntityManagerInterface;
/**
* Id generator that obtains IDs from special "identity" columns. These are columns
* that automatically get a database-generated, auto-incremented identifier on INSERT.
* This generator obtains the last insert id after such an insert.
*/
class BigIntegerIdentityGenerator implements Generator
{
* {@inheritdoc}
public function generate(EntityManagerInterface $em, ?object $entity)
return (string) $em->getConnection()->lastInsertId();
}
public function isPostInsertGenerator() : bool
return true;