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

preview_player
Показать описание
In this video we will implement one to one 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 one relationship between them. We will persist example data in database using CRUD repositories to test out if our mapping works correctly. We will track everything using H2 console. Everything with in-depth explanation! Keep playing with code!

Follow //CodefForgeYT on:
Рекомендации по теме
Комментарии
Автор

Great video thanks, I have a question, what if the user is already saved and the address is saved later then how should we map?

georgehiroshisilva
Автор

Great video, big thumbs up.
I have few questions and a request.

What to do if I want both user and user’s adders with one single Pk ? And what different it from JpaRepo to CrudRepo.

Also please make video using Rest controller for both entities with cascading

techappleteja
Автор

hi, I have a question, What would be the result if a make a one to one relation with a list<object> ?? what type of error would it be?

jmamb
visit shbcf.ru