Form creation

0

I'm starting to develop a web application using SpringBoot and to do the CRUD I'm using the native features like thymeleaf, controllers, DataJPA and etc. Until then everything seemed very quiet and easy to do, but there are some situations in the system where there is a one-to-many and many-to-many relationship and to save in the bank both the parent entity and the child entities need to be saved in the same such as: a sales screen where the main data (parent entity) is filled, and a list of products (child entities), when the user submits this form for sale and the products must be saved with a single request . You believe that the most correct way to do this is: create a javascript object for the user to fill in the data and when it sends I transform this object into a json, and then in case I need to change this register I do the reverse process (I get a json, transform into a javascript object and populate the form) or is there a better way to fix this difficulty?

    
asked by anonymous 28.03.2018 / 16:04

0 answers