Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork16
ivangfr/spring-data-jpa-relationships
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The goal of this project is to study the JPA relationships:one-to-one,one-to-many /many-to-one, andmany-to-many.
Onivangfr.github.io, I have compiled my Proof-of-Concepts (PoCs) and articles. You can easily search for the technology you are interested in by using the filter. Who knows, perhaps I have already implemented a PoC or written an article about what you are looking for.
- [Medium]Understanding Relationships in JPA: Introduction
- [Medium]Understanding Relationships in JPA: One-to-One with Simple Primary Key
- [Medium]Understanding Relationships in JPA: One-to-One with Shared Primary Key
- [Medium]Understanding Relationships in JPA: One-to-Many with Simple Primary Key
- [Medium]Understanding Relationships in JPA: One-to-Many with Composite Primary Key
- [Medium]Understanding Relationships in JPA: Many-to-Many with Simple Primary Key
- [Medium]Understanding Relationships in JPA: Many-to-Many with Simple Primary Key and Extra Column
- [Medium]Understanding Relationships in JPA: Many-to-Many with Composite Primary Key and Extra Column
- [Medium]Mastering JPA Relationships: Practical Examples of Bidirectional Associations
In a terminal and inside thespring-data-jpa-relationships root folder, run the following command:
docker compose up -d
In a terminal and inside thespring-data-jpa-relationships root folder, run the command below:
./mvnw clean spring-boot:run
Once the application is running, you can access its Swagger website athttp://localhost:8080/swagger-ui.html.
- Postgres
dockerexec -it postgres psql -U postgres -d jparelationshipsdb\d personsselect* from persons;
Type
exitto exit
- To stop the application, go to the terminal where it is running and press
Ctrl+C; - To stop and remove docker compose containers, network and volumes, go to a terminal and, inside the
spring-data-jpa-relationshipsroot folder, run the following command:docker compose down -v
In a terminal and inside thespring-data-jpa-relationships root folder, run the following command:
./mvnw cleantest[Medium]:Understanding Relationships in JPA: One-to-One with Simple Primary Key
[Medium]Understanding Relationships in JPA: One-to-One with Shared Primary Key
[Medium]Understanding Relationships in JPA: One-to-Many with Simple Primary Key
[Medium]Understanding Relationships in JPA: One-to-Many with Composite Primary Key
[Medium]Understanding Relationships in JPA: Many-to-Many with Simple Primary Key
[Medium]Understanding Relationships in JPA: Many-to-Many with Simple Primary Key and Extra Column
[Medium]Understanding Relationships in JPA: Many-to-Many with Composite Primary Key and Extra Column
One-to-One
- https://vladmihalcea.com/the-best-way-to-map-a-onetoone-relationship-with-jpa-and-hibernate
- https://www.callicoder.com/hibernate-spring-boot-jpa-one-to-one-mapping-example/
One-to-Many / Many-to-One
- https://vladmihalcea.com/the-best-way-to-map-a-onetomany-association-with-jpa-and-hibernate
- https://www.callicoder.com/hibernate-spring-boot-jpa-one-to-many-mapping-example/
Many-to-Many
About
The goal of this project is to study the JPA relationships: one-to-one, one-to-many / many-to-one, and many-to-many.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.






