🎙 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 6 of 10

What is the default fetch type of @ManyToOne if you do not set one?

What is the default fetch type of @ManyToOne if you do not set one?

  1. A.LAZY
  2. B.EAGER
  3. C.NONE
  4. D.It depends on the database
Answer & explanation

Correct answer: EAGER

That is why the lesson sets fetch = FetchType.LAZY explicitly; @OneToMany is LAZY by default.

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 →