I want to set the id of a new object with a specific value (that does not already exist in the database) without removing the auto-increment option of the field.
The id declaration :
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: Types::INTEGER, options: ['unsigned' => true])]
protected ?int $id = null;
What I want to do :
$newObject->setId(92183); // The id does not already exist in the db
Any idea how can I do that without removing the auto-increment please ?
PS : I'm using Symfony 6, I cannot find to try MetaClass method mentioned in Explicitly set Id with Doctrine when using "AUTO" strategy