← 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?
- A.LAZY
- B.EAGER
- C.NONE
- 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 →