From 4accca2c57b5f12169afe6a75c74efadd86d835d Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 8 Jul 2025 16:30:10 +0200 Subject: =?UTF-8?q?acc=C3=A8s=20instances=20depuis=20Prestation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Devis.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/model/entities/Devis.php') diff --git a/src/model/entities/Devis.php b/src/model/entities/Devis.php index 99589e7..8518f8e 100644 --- a/src/model/entities/Devis.php +++ b/src/model/entities/Devis.php @@ -13,9 +13,12 @@ class Devis #[ORM\GeneratedValue] private int|null $id = null; - #[ORM\ManyToOne(targetEntity: Prestation::class, cascade: ['persist'])] + //~ #[ORM\ManyToOne(targetEntity: Prestation::class, cascade: ['persist'])] + //~ #[ORM\JoinColumn(name: 'id_presta', referencedColumnName: 'id')] + //~ private Prestation|null $presta = null; + #[ORM\OneToOne(targetEntity: Prestation::class, inversedBy: 'devis', cascade: ['persist'])] #[ORM\JoinColumn(name: 'id_presta', referencedColumnName: 'id')] - private Prestation|null $presta = null; + private ?Prestation $presta = null; #[ORM\Column] private string $taches; -- cgit v1.2.3