Skills101
← All practice quizzes

Quiz: Relationships and Transactions

5 questionsNo time limitPass: 60%+10 XP on first pass

Model relationships (many-to-one, one-to-many, many-to-many through a join entity), understand lazy loading and the N+1 problem, and keep business rules safe with @Transactional — with a tested enrolment feature.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Listing 50 enrolments runs 1 query for the enrolments and 50 more for their courses. What is this called?

  2. Question 2

    By default, @Transactional rolls back when the method throws…

  3. Question 3

    A @Transactional method is called from another method in the same class. What happens?

  4. Question 4

    Why model Student ↔ Course with an Enrollment entity instead of @ManyToMany?

  5. Question 5

    What causes LazyInitializationException?