← Quiz: Relationships and Transactions: all 10 questions
Quiz: Relationships and Transactions · Question 7 of 10
What does readOnly = true on @Transactional tell Spring and the database?
What does readOnly = true on @Transactional tell Spring and the database?
- A.The method only reads data, so the transaction can be optimised for reads
- B.The method may never run
- C.Other users cannot read the table
- D.The method skips the proxy
Answer & explanation
Correct answer: The method only reads data, so the transaction can be optimised for reads
Use it on pure read methods such as listing a student's courses.
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 →