2 ms·
Actually it would probably be best to reverse the relation and put user_id's in the event objects. Then you can do queries like this: db.events.find({hoste
by mathias_10gen 16y ago
Actually it would probably be best to reverse the relation and put user_id's in the event objects. Then you can do queries like this:
db.events.find({hosted_by: MY_ID})
db.events.find({invited: MY_ID}) // invited is an array of users