← 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?
- A.After every change to any entity
- B.For new (transient) entities; managed entities are saved at commit by dirty checking
- C.Never, Hibernate saves everything automatically
- 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 →