Question 1: DATA JPA - Hibernate ORM Purpose
What is the main purpose of Hibernate ORM in a Spring Data JPA context?
Question 2: DATA JPA - @OneToOne Mapping
Which of the following best describes a @OneToOne relationship in JPA?
Question 3: DATA JPA - CrudRepository vs JpaRepository
Which statement correctly describes the relationship between CrudRepository and JpaRepository?
Question 4: DATA JPA - Default Fetch Types
What is the default fetch type for `@ManyToOne` and `@OneToOne` relationships in JPA?
Question 5: DATA JPA - Basics of @Transactional
What is the primary purpose of the @Transactional annotation in Spring Data JPA?
Question 6: DATA JPA - JPA Entity Annotation
Which annotation is used to mark a class as a JPA entity in Hibernate ORM?
Question 7: DATA JPA - Code Snippet (@OneToMany)
What does the following mapping represent?
Question 8: DATA JPA - Code Snippet (CrudRepository)
What will the following repository provide?
Question 9: DATA JPA - Default Collection Fetching
What is the default fetch type for `@OneToMany` and `@ManyToMany` associations?
Question 10: DATA JPA - Default Rollback Behavior
By default, @Transactional in Spring rolls back on which type of exceptions?
Question 11: DATA JPA - Code Snippet (Entity Mapping)
What will the following entity map to in the database?
Question 12: DATA JPA - @ManyToOne Mapping
In JPA, what is the typical use of @ManyToOne annotation?
Question 13: DATA JPA - Paging and Sorting
Which repository interface provides built-in methods for pagination and sorting?
Question 14: DATA JPA - Code Snippet (Lazy Loading)
What happens when accessing `department.getEmployees()` if `employees` is mapped as `LAZY`?
Question 15: DATA JPA - Code Snippet (Rollback Example)
What will happen to the database changes in the following method?
Question 16: DATA JPA - Entity Life Cycle States
Which of the following is not a valid JPA entity lifecycle state?
Question 17: DATA JPA - Code Snippet (@ManyToMany)
What is the effect of the following mapping?
Question 18: DATA JPA - Code Snippet (@Query Custom JPQL)
What does the following method do?
Question 19: DATA JPA - LazyInitializationException
When does a `LazyInitializationException` occur in JPA/Hibernate?
Question 20: DATA JPA - Checked Exception Handling
What will happen in this case?