Please stick to table structure shown @1:30. According to that in Users class it should be @JoinColumn(name = "user_profile_up_id", referencedColumnName = "up_id"). It looked confusing while explaining.
I have a doubt its working for me this way but if i try to have userid as foreign key in userprofile table its getting inserted as null i have changed all the annotations as well
Anyone please explain to me the need for the statement run in setting up the user. He created the instances for use and then for profile. Set the user.setprofile... and profile.setuser. why is the profile.setuser part needed in cascade is set to all and we only calling .save on the user repository? Am confusing my little brains here so would appreciate any explainers. Thanks for the vids
Both the table that is user and user profile has same column name "id" as primary key, is there any relationship between these two same column name "id".
JPA / Hibernate One to Many Mapping Example with Spring Boot at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Buya2plwkj4.html JPA / Hibernate Many to Many Mapping Example with Spring Boot at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--q9rp2pzvGU.html