The purpose of this repository is to provide examples of CRUDing JPA Relationships in Spring Boot.
- Clone this project
- Add an application.properties file in the
resources
folder based off ofexample.properties
- Run the project to build the database tables
- Run the seeder in the
database
directory - Open up the RelationshipController and test out the various routes
This project works with the following relationships:
- one-to-one: Ad and AdDetails
- one-to-many: Ad and Comments
- many-to-many: Ad and Tag
It is especially helpful to look at the various entity classes to observe how the JPA relationship mapping is setup.