class BigIntegerIdentityGenerator implements Generator (View source)

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.

Methods

__construct(string|null $sequenceName = null)

No description

string|int
generate(EntityManagerInterface $em, object|null $entity)

Generates an identifier for an entity.

isPostInsertGenerator()

Gets whether this generator is a post-insert generator which means that {@link generate()} must be called after the entity has been inserted into the database.

Details

__construct(string|null $sequenceName = null)

Parameters

string|null $sequenceName The name of the sequence to pass to lastInsertId() to obtain the last generated identifier within the current database session/connection, if any.

string|int generate(EntityManagerInterface $em, object|null $entity)

Generates an identifier for an entity.

Parameters

EntityManagerInterface $em
object|null $entity

Return Value

string|int

isPostInsertGenerator()

Gets whether this generator is a post-insert generator which means that {@link generate()} must be called after the entity has been inserted into the database.

By default, this method returns FALSE. Generators that have this requirement must override this method and return TRUE.