> I would suggest storing a list of friends in each user object and
inferring consent based on weather they reciprocate (both user list
each other as friends).
I considered this. I guess I didn't think it through enough last time
but it seems like it should work no.
So then when I want to query a user's friends (among who have
reciprocated), I do this query:
db.users.find({_id:{$in:[friend ids]},"friends":myUserId});
where "friends" contains an array of user ids.
> persons [_id1, _id2]
count int
I considered something like that but I need to be able to determine
who has consented and who hasn't.
Thank you both for your replies.
> > For more options, visit this group athttp://
groups.google.com/group/mongodb-user?hl=en.
> For more options, visit this group athttp://
groups.google.com/group/mongodb-user?hl=en.