I’m trying to link up comments to a the “To Do Data” demo, which I’m using to learn Backendless. I’m wondering how to comments related the ID that is passed through, which is saved as a column, relatedPost in the console?!
I know in Parse, the query was:
[query whereKey:@"photo" equalTo:self.photo];
I’d like to do the same for Backendless. What do I include?!
There is a much better way to express that relation. What you have now is not a relation, but a String column where you store object ID of another object. The way you have it, you should a whereClause:
Depending how you structure it. If you open the Post table and create a relation there to the Comments section, then that’s exactly what you are going to get.
You’re the best. That makes sense! How would it be added automatically though? Through the console, it’s manual. The whereclause is working great by the way!
Even if you do not have a table to hold your data, it will be created automatically the first time you try saving an object. Backendless will inspect the object you are saving and create table for it (and tables for any other related object which you reference through the properties). This is what we show in this example: https://backendless.com/feature-1-saving-objects-with-relations/