Disable inserting of data in generate_db
This commit is contained in:
parent
c1c45b9172
commit
f0c9be7c39
2 changed files with 4 additions and 2 deletions
|
@ -36,6 +36,8 @@ foreach($queries as $sql){ echo "$sql;\n"; }
|
|||
// updateSchema
|
||||
$tool->updateSchema($classes);
|
||||
|
||||
|
||||
die();
|
||||
// ADD EMOTIONS
|
||||
|
||||
$emotions = [];
|
||||
|
|
|
@ -15,13 +15,13 @@ class GameRepository extends EntityRepository
|
|||
'level' => $game->getLevel(),
|
||||
]);
|
||||
$position = $query->getSingleScalarResult();
|
||||
$total = $this->getGameCountForLevel($game->getLevel());
|
||||
$total = $this->getCountForLevel($game->getLevel());
|
||||
$highscore = $this->getHighscoreForLevel($game->getLevel());
|
||||
|
||||
return new Position($position, $total, $game->getScore(), $highscore);
|
||||
}
|
||||
|
||||
public function getGameCountForLevel(Level $level) {
|
||||
public function getCountForLevel(Level $level) {
|
||||
|
||||
$query = $this->_em->createQuery(
|
||||
"SELECT COUNT(g.id) FROM ".Game::class." g WHERE g.level = :level"
|
||||
|
|
Loading…
Reference in a new issue