--:--









Quiz for Spring Data JPA

Course: JAVA | Subject: Java | Topic: Spring Framework (Spring Boot)



Logo

Q1: What does JPA stand for in Spring Data JPA?

Logo

Q2: Which interface is extended to create a repository in Spring Data JPA?

Logo

Q3: Which annotation is used to mark an entity class in JPA?

Logo

Q4: What is the default ID generation strategy in JPA?

Logo

Q5: Which annotation is used to define primary key in JPA?

Logo

Q6: Which annotation specifies the table name in the database?

Logo

Q7: Which annotation maps a Java field to a database column?

Logo

Q8: Which method is used to save an entity in JpaRepository?

Logo

Q9: Which keyword can be used in method names to generate queries?

Logo

Q10: What does the @GeneratedValue annotation do?

Logo

Q11: Which annotation defines a one-to-many relationship?

Logo

Q12: What is the purpose of the @Query annotation?

Logo

Q13: What does the flush() method do in JPA?

Logo

Q14: Which annotation is used to execute native SQL?

Logo

Q15: What is Lazy loading in JPA?

Logo

Q16: Which exception is thrown when no result is found in Spring Data?

Logo

Q17: Which method retrieves all records from the table?

Logo

Q18: What is CascadeType.ALL used for?

Logo

Q19: How do you define a custom repository method using JPQL?

Logo

Q20: Which keyword in method name can be used to sort results?

Are you ready to start test? Set your time limit