Complex Where Clause

Hi all,

I want to write this whereclause. But currentPage is getting 0 result. I have a Messages Table.

receiver_id , sender_id are columns in this table. receiver is string(objectId) from segue

query.whereClause = “receiver_id.objectId in (’(backendless.userService.currentUser.getProperty(“objectId”))’,’(backendless.userService.findById(receiver))’) and sender_id.objectId in (’(backendless.userService.currentUser.getProperty(“objectId”))’,’(backendless.userService.findById(receiver))’)”

How can I do this where clause ?

if messaging was happened between two users, I over write(update) this row.

The following statement retrieves the entire object:


but you need to reference it’s objectId. If you already know objectId, why do you load the object for it?

receiver is a string.sender_id,receiver_id are data relation columns. Therefore, I used


for returning BackendlessUser type

Exactly… you cannot reference a complete BackendlessUser object in whereClase. It must be a string…