G
G
Gregory2019-06-21 06:14:12
Mongoose
Gregory, 2019-06-21 06:14:12

How to link models via _id in mongoos?

Scheme of names [{ _id: 523423, name: николай }]
Scheme of family names [{ _id: 123, family:1, member: 523423}]
How can I get the names of family members through the mongoose if I only know the family number?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Khokhlov, 2019-06-21
@Loovery

https://mongoosejs.com/docs/populate.html#
Another question is whether it makes sense to use Mongo with this database organization (or to organize data this way for Mongo).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question