开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜