JMS formatting on some models

This commit is contained in:
Ruben 2016-09-04 12:05:09 +01:00
parent 6693c4d60b
commit 48f43136d9
4 changed files with 5 additions and 2 deletions

View file

@ -27,7 +27,7 @@ class GameRepository extends EntityRepository
"SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level" "SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level"
) )
->setParameters([ ->setParameters([
'level' => $level(), 'level' => $level,
]); ]);
return $query->getSingleScalarResult(); return $query->getSingleScalarResult();
} }

View file

@ -633,7 +633,7 @@ class Hit
/** /**
* Gets the value of game. * Gets the value of game.
* * @JMS\Exclude
* @return mixed * @return mixed
*/ */
public function getGame() public function getGame()

View file

@ -33,10 +33,12 @@ class Level
/** /**
* @ORM\OneToMany(targetEntity="Target", mappedBy="level", cascade={"persist"}) * @ORM\OneToMany(targetEntity="Target", mappedBy="level", cascade={"persist"})
* @OrderBy({"position" = "ASC"})
*/ */
private $targets; private $targets;
/** /**
* @JMS\Exclude
* @ORM\OneToMany(targetEntity="Game", mappedBy="level", fetch="EXTRA_LAZY") * @ORM\OneToMany(targetEntity="Game", mappedBy="level", fetch="EXTRA_LAZY")
*/ */
private $games; private $games;

View file

@ -58,6 +58,7 @@ class Target
private $score; private $score;
/** /**
* @JMS\Exclude
* @ORM\OneToMany(targetEntity="Hit", mappedBy="target", fetch="EXTRA_LAZY") * @ORM\OneToMany(targetEntity="Hit", mappedBy="target", fetch="EXTRA_LAZY")
*/ */
private $hits; private $hits;