🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Spring Boot Interview Questions: all 10 questions

Quiz: Spring Boot Interview Questions · Question 6 of 10

When is save() actually needed with JPA?

When is save() actually needed with JPA?

  1. A.After every change to any entity
  2. B.For new (transient) entities; managed entities are saved at commit by dirty checking
  3. C.Never, Hibernate saves everything automatically
  4. D.Only for deletes
Answer & explanation

Correct answer: For new (transient) entities; managed entities are saved at commit by dirty checking

Changes to entities loaded in the transaction are flushed automatically.

Can you get the rest right without peeking?

Take the timed Quiz: Spring Boot Interview Questions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →