Answer the question
In order to leave comments, you need to log in
How to get _id mongodb + mongoose ?
Greetings.
Users are in the database. At authorization I write down the user in session.
When requesting, I try to get _id in this way req.session.user._id;
At the same time, I get undefined, although the debugger shows that there is 0.
PS For the _id increment, I use mongoose-auto-increment, so Number is there, and not the standard mongodb _id.
Why can't get _id and how to get it?
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