Рет қаралды 41,632
In this video we will implement one to many bidirectional 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 using @OneToMany and @ManyToOne annotations. 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!
Follow //CodefForgeYT on:
FB: / codeforgeyt
Twitter: / codeforgeyt
GitHub: github.com/cod...
Instagram: / codeforgeyt