Don’t just think of mongodb as a schemeless SQL database. Mongodb does not have the concepts of subqueries and cross-table queries.
According to your description, if you want to get the detailed information list of everyone followed by a user, one way is to save all the information of these users in User:
Don’t just think of mongodb as a schemeless SQL database. Mongodb does not have the concepts of subqueries and cross-table queries.
According to your description, if you want to get the detailed information list of everyone followed by a user, one way is to save all the information of these users in User:
Or you can use secondary query and check again in the code