🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Relationships and Transactions: all 10 questions

Quiz: Relationships and Transactions · Question 5 of 10

What causes LazyInitializationException?

What causes LazyInitializationException?

  1. A.Too many entities in memory
  2. B.Accessing a lazy relationship after the transaction/session has closed
  3. C.A missing @Id
  4. D.Using FetchType.EAGER
Answer & explanation

Correct answer: Accessing a lazy relationship after the transaction/session has closed

Load what you need inside the transaction.

Can you get the rest right without peeking?

Take the timed Quiz: Relationships and Transactions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →