Тёмный

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

CodeForgeYT
Подписаться 4,9 тыс.
Просмотров 42 тыс.
50% 1

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@801yaoichan
@801yaoichan 3 года назад
The best tutorial, this solved all my problems!
@CodeForgeYT
@CodeForgeYT 3 года назад
Awesome! Keep coding!
@drupalguy
@drupalguy 3 года назад
Just what I was looking for after much struggle. Thank you for the video
@CodeForgeYT
@CodeForgeYT 3 года назад
You are welcome!
@mamilosrosados
@mamilosrosados 4 года назад
Thanks man. I had some problems with relationships and everything is working now
@CodeForgeYT
@CodeForgeYT 4 года назад
Glad it works!
@AshishYadav-zw1vr
@AshishYadav-zw1vr 5 месяцев назад
best JPA tutorial. Thank you for vedio.
@patrikhyll4301
@patrikhyll4301 2 года назад
Great tutorial, explained very well!
@CodeForgeYT
@CodeForgeYT 2 года назад
Awesome! Glad you like it!
@dominicencho4179
@dominicencho4179 3 года назад
Thanks so much for this video. I have been looking for this
@CodeForgeYT
@CodeForgeYT 3 года назад
You are welcome!
@michaelmihov1651
@michaelmihov1651 3 года назад
So precise , thanks ! :)
@CodeForgeYT
@CodeForgeYT 3 года назад
Glad you like it!
@gauravswain6907
@gauravswain6907 4 года назад
thanks for the video man, i got here after quite a struggle. request you to share video on same concept but in mongodb !
@CodeForgeYT
@CodeForgeYT 4 года назад
Hey! I am happy that video helped you! Yeah MongoDB is quite popular so video about it sounds like great idea. Thanks for feedback. Happy coding!
@anthonyvertigo552
@anthonyvertigo552 3 года назад
Very good tutorial! Thank you :) btw where are you from ?
@CodeForgeYT
@CodeForgeYT 3 года назад
Hey, you are welcome, pl
@anthonyvertigo552
@anthonyvertigo552 3 года назад
@@CodeForgeYT I thought that. Keep doing that good job!. Thanks again for the tut :)
@Das.Kleine.Krokodil
@Das.Kleine.Krokodil Год назад
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.
@bartoszj.9050
@bartoszj.9050 2 года назад
Thanks, great tut
@CodeForgeYT
@CodeForgeYT 2 года назад
Glad it was helpful!
@gauravbisht516
@gauravbisht516 Год назад
It worked. Thanks!!!!
@kevinlapus7624
@kevinlapus7624 2 года назад
Thank you Teacher Love lots
@alexandrutudoran3941
@alexandrutudoran3941 3 года назад
Why are you calling the ArrayList constructor in the Cart Entity?
@RN-jo8zt
@RN-jo8zt 2 года назад
Any one can please explain me what does it mean? bidirectional relationship provides navigational access in both directions, so that you can access the other side without explicit queries.
@itzmeash1
@itzmeash1 2 года назад
Great example, but i am getting null value in my foriegn key mapping in child table, i am expecting primary key of cart to come in the child table, but its just NULL , can you advise, what could have gone wrong . Thanks
@dariagrigoruk3684
@dariagrigoruk3684 Год назад
because he gave you wrong information! It's bad tutorial
@canaldopericles2167
@canaldopericles2167 2 года назад
thanks
@sajanah1253
@sajanah1253 4 года назад
Hey man. Thanks a lot for this. Also would you mind making another video doing this with a web app? I mean create a cart, adding items and delete ect..
@CodeForgeYT
@CodeForgeYT 4 года назад
I want to make few videos about react so, I will take this into account. Thx for feedback!
@sajanah1253
@sajanah1253 4 года назад
@@CodeForgeYT Awesome. Love the simple and short videos man.
@CodeForgeYT
@CodeForgeYT 4 года назад
Glad to hear that ; D
@Mandih7225
@Mandih7225 3 года назад
Any tips on how to convert from OneToMany to ManyToMany relationship using Spring, Hibernate, and JPA?
@Mandih7225
@Mandih7225 3 года назад
I am aware there is a @ManyToMany annotation in Spring, but what needs to happen after changing the annotation?
@CodeForgeYT
@CodeForgeYT 3 года назад
@@Mandih7225 Check out my tutorial about Many to Many. From the code point of view you have to change your entities that are part of the relation and of course you have to change the annotation. From database perspective it depends. If it is empty you just have to create a new db structure generated by jpa. If you already have some data in the db you have to prepare migration scripts so you can migrate data to new structure
@Mandih7225
@Mandih7225 3 года назад
@@CodeForgeYT will do! Thanks!
@senthilmurugangsm
@senthilmurugangsm 3 года назад
Is it mandate to set parent in child objects?
@CodeForgeYT
@CodeForgeYT 3 года назад
I think it is for bidirectional relationship
@senthilmurugangsm
@senthilmurugangsm 3 года назад
@@CodeForgeYTyup, it's bidirectional. if we are not set, then null is inserted in the child entries.
@itzmeash1
@itzmeash1 2 года назад
@@senthilmurugangsm Hi Senthil , i followed the example shown in the tutorial , but i am getting NULL value as my forign key in child table, can you advise what could have been wrong . Thanks
@dariagrigoruk3684
@dariagrigoruk3684 Год назад
Many things doesn't work on my sample. Like the @JoinColumn( name="cart_id",..) it should be the same name as the primary Key in the class Cart "id"
Далее
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
Просмотров 207 тыс.