I'm sorry that I have to keep coming back to you on this. I really am working hard on it, but my background in MySQL is not helping much with the syntax for Mongo DB calls.
I am working on this in server code.
Can you help me troubleshoot the following? I am trying to collect my list of db rows in the result object. When I don't have any params.criteria I can get the entire database into the result object, but I can't figure out how to specify the "where" for this little bit of code that I found in your sever code tutorial.
I have searched the web for any similar code and can't find anything to give me any clue to how to do this.
Any thoughts or guidance??
code
result = {};
var params = {}; //Define parameters object
params.criteria = { //Query criteria:
//??How to structure search for where r_owner = + owner_id +??
//'r_owner': {"'+ owner_id +'"} //Doesn't work
'where={"r_owner": "' + owner_id + //Doesn't work
};
//Make the query and save it to the result object
result.query = Collection.query(db_id, collectionName, params);
//Output the results of the query
response.success(result);
/code