← All topics
Quiz: JPA and Hibernate: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does JpaRepository<Course, Long mean?
- Q2. What query does findByFeeLessThanEqual(int max) run?
- Q3. In JPQL, what do you write after FROM?
- Q4. Why does CourseService.update not call repository.save()?
- Q5. Which annotation marks the primary key field?
- Q6. What happens at startup if a repository has the method findByTitel(String t) (a typo)?
- Q7. Inside one transaction, the same course id is loaded twice. How many SELECT queries run?
- Q8. An entity was loaded in a transaction that has now ended. Its title is changed. What happens?
- Q9. What does nativeQuery = true in @Query mean?
- Q10. Why does a JPA entity need a no-argument constructor?