Skip to content

Tag: spring-data-jpa

How to annotate Map with JPA?

The app’s stack: Spring MVC, Spring DataJPA, Hibernate. There are three entities: student, tutor, theme. Theme: Student: Tutor: For save student-tutor-theme relationships i want use this table (PostgreSQL): How i can to annotate tutors and students fields in entities, for their content correct persists …

Spring Data JPA – Get all elements

I’m new to Spring Data JPA and I want to ask if there is a method that can be used to fetch all items, not by a certain criterion. Any help would be helpful. Answer Use the findAll method from repository Take a look here Spring Data JPA API Look here a small example that will fetch all MyObj objects