Java Spring Boot JPA | Hibernate | ManyToOne OneToMany | 2021

preview_player
Показать описание
In this tutorial we cover the Java Persistence API using Hibernate with Spring Boot Data JPA, focusing on the ManyToOne OneToMany relationships for both unidirectional and bidirectional relationships.

The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database.
JPA is now considered the standard industry approach for Object to Relational Mapping (ORM) in the Java Industry.
JPA is specification, and requires an implementation.
JPA also defines a runtime EntityManager API for processing queries and transaction on the objects against the database.

#JavaSpringBootJPA #Java #JPA #Hibernate #SpringBoot #SpringDataJPA
Рекомендации по теме
Комментарии
Автор

bro needs to meditate :p thx for the explanation

dehrk
Автор

simple and good explanation. please keep going bro, I mean right up until your channel explodes with a million subs and you go into the crazy loop of adverts and sponsors.

abhishekgupta
Автор

For unidirectional, I am observing that the foreign key created example cart_id is needed to be defined as nullable. It fails if i make it non null as I dont want any items exist without a cart association. Any thoughts?

singarajusreedhar
Автор

You should have showed the tables, it would be a million times better than having to deal with the awful stack.

paulovinicius
Автор

Do I understand correctly that if there are two entities with a One-to-Many relationship, such as Employee and EmployeePhones. Then you need to receive such data on the server in DTO with one call, but with two separate json? And write down one by one: first the employee, get the ID from the saved employee, and then we record the phones using this ID for communication.

Das.Kleine.Krokodil
Автор

mapped by and joincolumn both at a time not allowed

singarajusreedhar
Автор

I do the same as you do on a video, but the bidirectional relation causes infinite recursion. I hate Spring

Photoshopper
Автор

Saliva noise while talking and lack of table drawing. Next

mysocial
Автор

I was today, all day trying find the error, I spent all my day, now I realized my error.. is that the @JoinColumn i put that in the Entity of the Sets.. now i realized the @JoinColumn must be in the Entity One not in the Entity Many. Thanks bro😅😭

higherstr