X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FEntity%2FFriendship.php;h=5065733cea9c2022538038e30675d36d6dd822c5;hb=a692051d7b10cab8a1ff7badcf67862fc7109ad4;hp=a069bceca52184cd28ee1a3b6418f47fe2721db9;hpb=dec6d0310680edbf06e4564590d6e4a3ffde8a6e;p=Project_proches_de_moi-server.git diff --git a/src/Entity/Friendship.php b/src/Entity/Friendship.php index a069bce..5065733 100644 --- a/src/Entity/Friendship.php +++ b/src/Entity/Friendship.php @@ -2,27 +2,31 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; +use JMS\Serializer\Annotation as Serializer; /** * @ORM\Entity() * @ORM\Table(name="Friendship"); + * @Serializer\ExclusionPolicy("all") */ class Friendship { /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends", cascade={"all"}) + * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends") */ protected $person; /** * @ORM\Id - * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends_with_me", cascade={"all"}) + * @ORM\ManyToOne(targetEntity="Person", inversedBy="friends_with_me") + * @Serializer\Expose */ protected $friend; /** * @ORM\Column(type="boolean", options={"default":false}) + * @Serializer\Expose */ protected $is_valid;