A
A
Alex_mos2020-07-17 17:50:39
Node.js
Alex_mos, 2020-07-17 17:50:39

How to add data to generated mongodb document?

React, Node, Mongodb website.
For example, there are three pages with forms.
Receiving data on the first page, when you click on the button, the data is sent to the server, processed and written to the database (a new document is created in the collection), and the transition to the next page occurs.
On the second page, we also receive data, send it to the server and .....

How to add data to the document that was created when sending data from the first page?
How to assign a document from the mongodb collection to each user?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex_mos, 2020-08-05
@Alex_mos

Found a solution.
I don’t know how correct, when you first visit the site, the id is stored in session storage, and when creating a document, this id is written to the document.
Then, with further additions of data, we look for a document by this id.

L
Lynatik001, 2020-07-17
@Lynatik001

There is more question in 1, according to the structure of the database tables. Q2 Can only registered users submit these forms? In 3 mungus, this is not a relational database, but it has its own features, how to get around all this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question