JPA Interview Questions
💡 Click any question to read the full AI-powered answer.
Q21
What are transactional propagation types in Spring and what are their use cases?
✓ Answered
→
Q22
What are transaction isolation levels in the @Transactional annotation and when should they be used?
✓ Answered
→
Q23
What is pessimistic locking in JPA and when would you use it instead of Serializable isolation?
✓ Answered
→
Q24
What is JPA and what problem does it solve?
✓ Answered
→
Q25
What is the difference between JPA and JDBC?
✓ Answered
→
Q26
What is the difference between JPA and Hibernate?
✓ Answered
→
Q27
What is an Entity in JPA?
Generate
→
Q28
What is the purpose of the @Entity annotation?
Generate
→
Q29
What is the purpose of the @Id annotation in JPA?
Generate
→
Q30
What is the difference between @Column and @JoinColumn?
✓ Answered
→
Q31
What is the purpose of the @GeneratedValue annotation?
✓ Answered
→
Q32
What are the different ID generation strategies in JPA?
✓ Answered
→
Q33
What is the Persistence Context in JPA?
✓ Answered
→
Q34
What is the difference between EntityManager and EntityManagerFactory?
✓ Answered
→
Q35
What are the main responsibilities of EntityManager?
✓ Answered
→
Q36
What is the difference between persist() and save()?
✓ Answered
→
Q37
What is the difference between find() and getReference() in JPA?
✓ Answered
→
Q38
What is JPQL and how is it different from SQL?
✓ Answered
→
Q39
What are named queries in JPA?
✓ Answered
→
Q40
What is the Criteria API in JPA?
✓ Answered
→