How to get relation objectID from user class ?

As you can see on the below of the picture i have a relation object which is user object . I would like to get the relation object id .







let query = BackendlessDataQuery()

 let whereClause = "type = 'likes' AND status.objectId = '\(uploadStatus)'" //User Can Be Query Through Object ID
 query.whereClause = whereClause
 print("i = \(i) objectCount = \(objectCount)")
 
backendless.persistenceService.of(Activity.ofClass()).find(
 query,
 response: { ( totalLikes : BackendlessCollection!) -> () in
 let currentPage = totalLikes.getCurrentPage()
 
 for likedArray in currentPage as! [Activity] {
 
 print(likedArray.fromUser.objectId)
 }
 
 },
 error: { ( fault : Fault!) -> () in
 print("Server reported an error: \(fault)")
 }
 
 )


Keep in mind that related objects are NOT returned by default, you need to request them. To do that you need to create QueryOptions object and add to it “fromUser” relation. Then set the query options into the query before you do the search:

        let query = BackendlessDataQuery()
        let queryOptions = QueryOptions()
        queryOptions.addRelated("fromUser")
        query.queryOptions = queryOptions

OK thanks a lot i will keep in mind .