From 4411576d16a514a007e9f9f996609781242cc108 Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 4 Sep 2016 13:34:48 +0100 Subject: [PATCH] Exclude user in JSON --- src/Models/Game.php | 1 + src/Models/User.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Models/Game.php b/src/Models/Game.php index d5ff1fe..311267f 100644 --- a/src/Models/Game.php +++ b/src/Models/Game.php @@ -28,6 +28,7 @@ class Game /** * @ORM\ManyToOne(targetEntity="User", inversedBy="games") * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) + * @JMS\Exclude */ private $user; diff --git a/src/Models/User.php b/src/Models/User.php index 3316da0..1ec7181 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -30,6 +30,7 @@ class User implements UserInterface /** * @ORM\OneToMany(targetEntity="Game", mappedBy="user") + * @JMS\Exclude */ private $games;