How can I construct Query joins?
I would like the user to see a list of other users they are connected with. To do this I created a Friends collection that maps the objectids from Users as userId and friendId. How do I display the names of each friend instead of the objectId? In other words, how do I do a query that joins two collections? I'm used to T-SQL where this is simply done. I'd hate to have to go back and hit the server one friend at a time to retrieve each name, when I really want something like this:
SELECT _objectId, name
FROM Users
WHERE _objectId IN
(SELECT _friendId FROM Friends WHERE userId = @myObjectId)
ORDER BY name