friends of friends in mongodb
Is there a way to do something like friends of friends in mongodb... In mysql it was
select friend_id from friends 开发者_StackOverflow社区where user_id IN (select friend_id from friends where user_id = id)`
You have to perform multiple queries unless you are able to store your data as nested data structure inside one document
embeds friendship?
and in your friendship model have a friender and a friendee with request and accept date.
精彩评论