I'm building a REST app.
j & # 39; I boxes. Each box contains goods.
Items must be saved in their own MySQL table because they will be sold separately (retail).
The problem is: the items do not have a barcode, so I save their IDs under the name
For the moment, when I put a box in a table through a TO POST request, I record the
ID from the box to, as well as the
number elements that it contains. When I treat this TO POST request, I loop on the
number elements to create elements in the corresponding table.
It works. But it is not clean and does not respect the rest.
Please suggest me a cleaner approach.