Here is some Parse Cloud code I have running:
…….
var sentenceListQuery;
sentenceListQuery = new Parse.Query("SentenceList");
sentenceListQuery.equalTo("unit", request.params.unitID); // May be wrong!
sentenceListQuery.find
({…….});
unit is a column of type: Pointer
If I get rid of the line marked “May be wrong!”, by commenting it out, I get 83 as the number of rows found by the
.find(), which is what I expect.If I leave it there I get zero lines, which is not what I expect. I should get one line.
So my guess is that something is not right with the way I write the code on this line, but I don’t know what. Should I use a different syntax because it is a pointer? I found a few seemingly related things on the net, but nothing driving me to a working solution. Or would it be that relationships on Parse.com are more difficult to use than it should; and one should avoid using them? In fact getting the same result without relationships would be rather easy; I just thought it was better practice to use them.