Disable inserting of data in generate_db

This commit is contained in:
Ruben 2016-09-04 12:41:59 +01:00
parent c1c45b9172
commit f0c9be7c39
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,8 @@ foreach($queries as $sql){ echo "$sql;\n"; }
// updateSchema
$tool->updateSchema($classes);
die();
// ADD EMOTIONS
$emotions = [];

View File

@ -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"