diff --git a/src/Models/HitRepository.php b/src/Models/HitRepository.php index 3f4c1af..0775ad4 100644 --- a/src/Models/HitRepository.php +++ b/src/Models/HitRepository.php @@ -9,7 +9,7 @@ class HitRepository extends EntityRepository public function getBetterHit(Hit $hit) { // we want only the slightly better hit... $query = $this->_em->createQuery( - "SELECT * FROM ".Hit::class." WHERE target = :target AND score > :score ORDER BY score ASC" + "SELECT h.* FROM ".Hit::class." h WHERE h.target = :target AND h.score > :score ORDER BY score ASC" ) ->setMaxResults(1) ->setParameters([