Access DB Ref MongoDB -


What is the best way to access / query a DB referee: Update:

  User: Name, groupref: {$ ref: "groups", $ id: "ObjectId ..."}} group: name, topic, country, ..., ..  

The impression is that the user belongs to only one group, how do I get all the users for a group whose country starts with the letter 'A'? Country is a string.

In addition to this, how will it change if users bellengadda for more than 1 group?

  db.users.find ({group ref: {$ ref: "group", $ id: group._id}})  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -