@@ -236,12 +236,13 @@ type, which converts to/from UUID objects automatically::
236
236
237
237
use Doctrine\ORM\Mapping as ORM;
238
238
use Symfony\Bridge\Doctrine\Types\UuidType;
239
+ use Symfony\Component\Uid\Uuid;
239
240
240
241
#[ORM\Entity(repositoryClass: ProductRepository::class)]
241
242
class Product
242
243
{
243
244
#[ORM\Column(type: UuidType::NAME)]
244
- private $someProperty;
245
+ private Uuid $someProperty;
245
246
246
247
// ...
247
248
}
@@ -265,7 +266,7 @@ entity primary keys::
265
266
#[ORM\Column(type: UuidType::NAME, unique: true)]
266
267
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
267
268
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
268
- private $id;
269
+ private ?Uuid $id;
269
270
270
271
public function getId(): ?Uuid
271
272
{
@@ -422,12 +423,13 @@ type, which converts to/from ULID objects automatically::
422
423
423
424
use Doctrine\ORM\Mapping as ORM;
424
425
use Symfony\Bridge\Doctrine\Types\UlidType;
426
+ use Symfony\Component\Uid\Ulid;
425
427
426
428
#[ORM\Entity(repositoryClass: ProductRepository::class)]
427
429
class Product
428
430
{
429
431
#[ORM\Column(type: UlidType::NAME)]
430
- private $someProperty;
432
+ private Ulid $someProperty;
431
433
432
434
// ...
433
435
}
@@ -451,7 +453,7 @@ entity primary keys::
451
453
#[ORM\Column(type: UlidType::NAME, unique: true)]
452
454
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
453
455
#[ORM\CustomIdGenerator(class: 'doctrine.ulid_generator')]
454
- private $id;
456
+ private ?Ulid $id;
455
457
456
458
public function getId(): ?Ulid
457
459
{
0 commit comments