Exclude user in JSON

This commit is contained in:
Ruben 2016-09-04 13:34:48 +01:00
parent 55c418aa2f
commit 4411576d16
2 changed files with 2 additions and 0 deletions

View file

@ -28,6 +28,7 @@ class Game
/** /**
* @ORM\ManyToOne(targetEntity="User", inversedBy="games") * @ORM\ManyToOne(targetEntity="User", inversedBy="games")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false) * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
* @JMS\Exclude
*/ */
private $user; private $user;

View file

@ -30,6 +30,7 @@ class User implements UserInterface
/** /**
* @ORM\OneToMany(targetEntity="Game", mappedBy="user") * @ORM\OneToMany(targetEntity="Game", mappedBy="user")
* @JMS\Exclude
*/ */
private $games; private $games;