🎙 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 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?

  1. A.The method only reads data, so the transaction can be optimised for reads
  2. B.The method may never run
  3. C.Other users cannot read the table
  4. 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 →