JPA Interview Questions
💡 Click any question to read the full AI-powered answer.
Q41
What is the difference between JPQL and Criteria API?
✓ Answered
→
Q42
What are the different types of relationships in JPA?
✓ Answered
→
Q43
What is the difference between @OneToMany and @ManyToOne?
✓ Answered
→
Q44
What is the difference between @ManyToMany and @OneToMany?
✓ Answered
→
Q45
What is mappedBy in JPA relationships?
✓ Answered
→
Q46
What are cascading operations in JPA?
✓ Answered
→
Q47
What are the different cascade types available in JPA?
✓ Answered
→
Q48
What is orphanRemoval in JPA?
✓ Answered
→
Q49
What is lazy loading in JPA?
✓ Answered
→
Q50
What is eager loading in JPA?
✓ Answered
→
Q51
What is the N+1 select problem in JPA?
✓ Answered
→
Q52
How can you solve the N+1 query problem in JPA?
✓ Answered
→
Q53
What is optimistic locking in JPA?
✓ Answered
→
Q54
What is the purpose of the @Version annotation?
✓ Answered
→
Q55
What is the difference between optimistic locking and pessimistic locking?
✓ Answered
→
Q56
What is dirty checking in JPA?
✓ Answered
→
Q57
What is the difference between flush() and clear() in JPA?
✓ Answered
→
Q58
What is the difference between detach() and remove() in JPA?
✓ Answered
→
Q59
What is batch processing in JPA and how can it improve performance?
✓ Answered
→
Q60
What is the difference between first-level cache and second-level cache in JPA?
✓ Answered
→