Answer the question
In order to leave comments, you need to log in
Mongose how to properly organize data sending schema?
I have 2 collections of data. PRODUCT and ORDERS.
And they directly depend on each other , according to business logic. PRODUCT is what the business puts in the product list. And Orders is a list of orders . That is, orders are taken from PRODUCT. When I try to send an order with one request. Where two json strings are repeated. That is mongoose . Throws off only what is below . I highlighted this with a red line. How do I organize the ordering scheme like this. What would I order. Could send any number of products to the server?
-Nevertheless, I cannot
know how many products the business will eventually have.
Possible solutions I came up with...
On the front end, put everything in an array. And from there to get all the goods. Going through each, and sending. (crutch)
Draw a huge button for each order. Through which the order will be carried out. (crutch)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question