JPA / Hibernate One to One Mapping Example with Spring Boot at ua-cam.com/video/kAYjrhcrx_8/v-deo.html JPA / Hibernate Many to Many Mapping Example with Spring Boot at ua-cam.com/video/-q9rp2pzvGU/v-deo.html
To the point information. Very useful from beginners to intermediate. Simple explanation and example that helps to understand heads-to-toe information.
Excellent content, you can make a video, where you have tables with various relationships and teach how to map them in classes, I just have a problem like that.
Please show show to.fetch the data, fetching is more difficult that saving updating and deleting because of multiple queries it execute, iwant to show how to efficiently fetch the datas with using minimal code and/or queries.
I have a question, what happens if you use the findAll() for Post it will bring you the comments?, I have this exact mapping and I can get the post a comment is in, but I can get the comments on a post, the collection always return null
Hi, If passible add thymeleaf + JPA / Hibernate One to Many Mapping Example with Spring Boot, like your example have one post to many comments with frontend
Great video @java guides, I need to update 3 levels a customer his child (product) and his granchild (promotion) how can I save those 3 entities ad once?
Nice video, But... where the are the remaining crud operations 1. updating the existing comment for a post 2. delete the comment from a existing post 3.save a new comments to existing post
@@jyotikinkarsahariacse17vel2 at 9:20, I have explained about cascade type and this should work. If you delete Post then along with post, it's comments should delete. Try one more solution, add orphanRemoval = true attribute to one to many annotation. stackoverflow.com/questions/2011519/jpa-onetomany-not-deleting-child
Bro, if i want to have 3 Entites relationed but i don´t want to delete the realationed tables.I explain myself better: i have a Entity called Screen that can have multiples list of reproduction, but if user wants to delete a Screen, i don´t want to delete lists of reproduction too, cuz it doesn´t have sense,they are totally independent(Screen and Lists of reproduction).I understand One Screen can have multiple lists of reproduction, but i don´t want the cascade,use can save a screen whenever they want and later save the list of reproduction,what cascade type is that?
@@JavaGuides I will share the exact error. If I do only one to many its working but if I do bidirectional mapping JSON issues like Infinite loop recursion Stack Overflow issue
Actually i want this code input from html page ,when i insert 5 records with html page they will save with their individual id and one same id for 5 records guide me with user input from web...
It's based on the business use case and requirement. I suggest to understand both unidirectional and bidirectional mappings so that it will very easy to get real-time use cases and scenarios.
Good point but I do use Lombok in big projects. Using Lombok in simple example or project does not make sense and also beginners were confuse with Lombok so I don't prefer using Lombok in simple projects.
JPA / Hibernate One to One Mapping Example with Spring Boot at ua-cam.com/video/kAYjrhcrx_8/v-deo.html
JPA / Hibernate Many to Many Mapping Example with Spring Boot at ua-cam.com/video/-q9rp2pzvGU/v-deo.html
Can we have video for bidirectional one to many mapping?
Struggled for hours and finally followed this tutorial and fixed my issue in 5 mins.
Awesome tutorial. Thanks a ton for doing this!
Thanks for sharing this nice tutorial. Simple and precise, every single second hits the point.
This is such a great tutorial! I was really struggling with a project, but this video helped me simplify my code so much. Thanks again :)
Best youtube channel for spring boot learning, I'm improving fast, thank you!
To the point information. Very useful from beginners to intermediate.
Simple explanation and example that helps to understand heads-to-toe information.
I know this video is 2 years old but it was still very heplful!
Superb clear and simple instructions. Thank you sir 👍
omg dude thank you so much, the best java channel on yt
wow! thaks! I'm Korean. Your this video is very useful me! thank you.
Excellent content, you can make a video, where you have tables with various relationships and teach how to map them in classes, I just have a problem like that.
Yes. I will plan to create a video tutorial which will cover all the mappings.
But y three update should happen.
How to make it single insert that set foreign key also
Please show show to.fetch the data, fetching is more difficult that saving updating and deleting because of multiple queries it execute, iwant to show how to efficiently fetch the datas with using minimal code and/or queries.
Thanks for the video but I am still getting integrity constraint violated- parent key not found . Could you please help .
Beautiful explanation brother
Bro how to perform remaining crud operations
Thanks for the video but I am need to know how can i implemint this mapping in my front end in angular
Thank for good explanation sir, this is valuable
Nice tutorial. I wish the systems would provide them as well
I have a question, what happens if you use the findAll() for Post it will bring you the comments?, I have this exact mapping and I can get the post a comment is in, but I can get the comments on a post, the collection always return null
Great explanation! Keep up the amazing work!
Is one to many and one to one bidirectional mapping can be there?
thanks alot✨you help me alot
Really nice sir great thanks for such a tutorial
Hi, If passible add thymeleaf + JPA / Hibernate One to Many Mapping Example with Spring Boot, like your example have one post to many comments with frontend
How can you find all comments based on post_id?
How do you update comments with new one or delete one
Thank u , this video help me alot
Great video @java guides,
I need to update 3 levels a customer his child (product) and his granchild (promotion) how can I save those 3 entities ad once?
i have a diagram of Class i want know how i make it with jpa/hibernate(spring boot)
Nice video, But... where the are the remaining crud operations
1. updating the existing comment for a post
2. delete the comment from a existing post
3.save a new comments to existing post
you simply can use PostRepository in your commandLineRunner implementation method run().
Referencedcolumn=I'd I'd belongs to comments right?
Can we take some other column as referencedColumn rather than primary key
Thankyou was helpful!
Thank you so much. It helped me a lot. Glad to subscribe to your channel bro :)
When I'm deleting or updating the data it is deleting from the parent table but not from the child table!!!! How to resolve this?
Check cascadetype on parent class
@@JavaGuides I did but it's not working!! Do we need to perform bi-directional mapping?
@@jyotikinkarsahariacse17vel2 at 9:20, I have explained about cascade type and this should work. If you delete Post then along with post, it's comments should delete.
Try one more solution, add orphanRemoval = true attribute to one to many annotation.
stackoverflow.com/questions/2011519/jpa-onetomany-not-deleting-child
Is this helped you?
@@JavaGuides I'll try
Thank you sir.
Good show! make same thing with API please
Bro, if i want to have 3 Entites relationed but i don´t want to delete the realationed tables.I explain myself better: i have a Entity called Screen that can have multiples list of reproduction, but if user wants to delete a Screen, i don´t want to delete lists of reproduction too, cuz it doesn´t have sense,they are totally independent(Screen and Lists of reproduction).I understand One Screen can have multiple lists of reproduction, but i don´t want the cascade,use can save a screen whenever they want and later save the list of reproduction,what cascade type is that?
I suggest read this article at vladmihalcea.com/a-beginners-guide-to-jpa-and-hibernate-cascade-types/
This example is not working in my spring boot rest controller
What is the error?
@@JavaGuides I will share the exact error. If I do only one to many its working but if I do bidirectional mapping JSON issues like
Infinite loop recursion
Stack Overflow issue
@@JavaGuides Can you show me one to many bidirectional mapping in spring boot rest controller
Really good
Good video 🤘
Actually i want this code input from html page ,when i insert 5 records with html page they will save with their individual id and one same id for 5 records guide me with user input from web...
Thanks 💚
Would you recommend unidirectional or bidirectional mapping
It's based on the business use case and requirement. I suggest to understand both unidirectional and bidirectional mappings so that it will very easy to get real-time use cases and scenarios.
thank you
Thoda slow kro ki pta chle itna jaldi me kyu ho aap??
It's perfect and working
Great
Super
Use lombok bro.. you will save lot of time.
Good point but I do use Lombok in big projects. Using Lombok in simple example or project does not make sense and also beginners were confuse with Lombok so I don't prefer using Lombok in simple projects.
@@JavaGuides makes sense, BTW very good video mate. Thank You.
thnx bro
Спасибо динеш)!