I have a table “bands” with a column named “members”.
The members column is a 1:N relationship to the Users table.
I want to run a query to return bands where the current user is included as one of the members.
I am trying to use this:
var whereClause = "bands[members].objectId='" + currentUser.objectId + "'";
var queryBuilder = Backendless.DataQueryBuilder.create().setPageSize( 20 );
queryBuilder.setWhereClause( whereClause );
queryBuilder.setRelated( [ "members" ] );
Backendless.Data.of( "bands" ).find( queryBuilder )
.then( function( result ) {
console.log(result)
})
This is not returning anything even though I have my user included in the members list.
Am I configuring the query correctly?