Count of Relations User in Swift

Hi everyone,

There is my likes table.How can I count all relations for a house? (liked_id column 1 to N)</img>


Alican, a “relation” is not something you can count. You can count though number of object in a relation. Do you need to know how User objects are available for the “liked_id” relation?

Mark, I want to count all of liked_id.objectId. I show how many person liked for a house

You make a query to the Users table using Data service API with the following whereClause:

House[liked_id].objectId = ‘houseObjectId’

When you receive a response, see the totalObject property.