Java Spring Boot - JPA - Hibernate - H2 - One To Many Unidirectional Relationship - @OneToMany

Опубликовано: 10 Октябрь 2024
на канале: CodeForgeYT
12,645
132

In this video we will implement one to many unidirectional relationship using Java, Spring Boot, JPA, Hibernate and H2 in memory database. We will start with generating project and adding all of the necessary dependencies. Later on we will create entities and then we will create a one to many relationship between them. We will persist example data in database using CRUD repositories to test out if our mapping works correctly. Later we will test out if our operations are cascaded to the associtated entities and if the orphan removal attribue is working correctly for the entities that depends on each other. We will track everything using H2 console. Everything with in-depth explanation! Keep playing with code!

Code on GitHub: https://github.com/codeforgeyt/jpa-re...

Follow //CodefForgeYT on:
FB:   / codeforgeyt  
Twitter:   / codeforgeyt  
GitHub: https://github.com/codeforgeyt
Instagram:   / codeforgeyt