DDC-3445: ERROR GENERATED VALUE (UUID) #4250

Open
opened 2026-01-22 14:38:06 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 10, 2014).

Originally assigned to: @ostrolucky on GitHub.

Jira issue originally created by user AdenKejawen:

UUID is not working (missing ID and need to set manually)

/****
 * @ORM\Entity
 * @ORM\Table(name = "utl_role")
 */
class Role implements EntityInterface
{
    /****
     * @ORM\Id
     * @ORM\Column(name = "id", type = "guid")
     * @ORM\GeneratedValue(strategy = "UUID")
     ****/
    protected $id;

i need to pass the id manually

$role->setId((new UuidGenerator())->generate($this->em, $role));

because the id is not set and error when i try to persist.

This error is arrive when i try to persist an entity i loop

I use postgresql 9.3

Originally created by @doctrinebot on GitHub (Dec 10, 2014). Originally assigned to: @ostrolucky on GitHub. Jira issue originally created by user AdenKejawen: UUID is not working (missing ID and need to set manually) ``` /**** * @ORM\Entity * @ORM\Table(name = "utl_role") */ class Role implements EntityInterface { /**** * @ORM\Id * @ORM\Column(name = "id", type = "guid") * @ORM\GeneratedValue(strategy = "UUID") ****/ protected $id; ``` # i need to pass the id manually `$role->setId((new UuidGenerator())->generate($this->em, $role));` because the id is not set and error when i try to persist. This error is arrive when i try to persist an entity i loop # I use postgresql 9.3
admin added the Bug label 2026-01-22 14:38:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4250