diff --git a/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java b/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java index b07b1f8b..eb4bef47 100644 --- a/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java +++ b/api/src/main/java/lab/en2b/quizapi/questions/question/QuestionRepository.java @@ -4,6 +4,6 @@ import org.springframework.data.jpa.repository.Query; public interface QuestionRepository extends JpaRepository { - @Query(value = "SELECT q FROM questions WHERE q.language=?1 ORDER BY RANDOM() LIMIT 1", nativeQuery = true) + @Query(value = "SELECT * FROM questions WHERE language=?1 ORDER BY RANDOM() LIMIT 1", nativeQuery = true) Question findRandomQuestion(String lang); }