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.
@VLADICA94KG5 жыл бұрын
Actually I think that on @ManyToOne fetch type is EAGER by default, so that means whenever you fetch Address it will fetch Employee in same query. it is presented in console as well, as both system.out.println are presented one below another. Otherwise, it will be presented like: 1. query, 1. sysout, 2. query, 2. sysout
@makwanadarshan83754 жыл бұрын
a lot to me. Thank you myn.
@suresh10886 жыл бұрын
Not working for me Sir. Hibernate runs into some infinite loop while doing as suggested.
@sumankumar-hm8sh5 жыл бұрын
hello kishan i like to see your channel i learn lots of java concept from your channel hey kishan can u make video on eclipse shortcut keys that makes me experience developer
@boikimphore47076 жыл бұрын
Nice way to do mapping if you do not want associative entities.