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.
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.
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
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..
@@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
@@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