{ code: '1017', message: 'Invalid where clause' }

Hi again. Sorry that I ask questions so often, but I have another problem. I’m trying get info about user by params -=again=- and I getting BackendlessFault{ code: ‘1017’, message: ‘Invalid where clause’ }, but in example it works i think.

What am I doing?

StringBuilder whereClause = new StringBuilder();
whereClause.append("bodybuilding = '" + true + "' and crossfit = '" + true + "'");

BackendlessDataQuery dataQuery = new BackendlessDataQuery();
Backendless.Persistence.of(Users.class).find(dataQuery, this);

trying get user name by bodybuilding and crossfit boolean params from User table. What am I doing wrong?

How to get all users from Users table by this params? Help please.

Thanks advance;

Hi Gleb,

The whereClause you formed looks exactly like this:

[name]bodybuilding = 'true' and crossfit = 'true'

This is definitely an incorrect syntax. I suppose you need just this:

bodybuilding = 'true' and crossfit = 'true'

Also you shouldn’t use your custom Users class, you BackendlessUser instead:

Backendless.Persistence.of(BackendlessUser.class).find(dataQuery, this);

Thank you very much! I found this page


and understood what I done wrong.

Thanks for help.

Could you tell me please how to get all users from table users? Not from last page? I need all users who matched to this params.

What do you mean by the last page?

Our Data Service API uses the paging concept, which helps to control the size of the data you request from the backend. You may increase it to 100, if you need. Then you’ll receive up to 100 objects matching your query with one request. If you need more, you should call BackendlessCollection’s nextPage() method, which will return you the next pageSize objects matching your query.

Ok, but if I need all users who matched to my params? Can I get them all?

How can i increase to 100? is 100 max value for paging?

You get all users who match the params. Just they’re paged.

You need to use BackendlessDataQuery’s setPageSize(int) method.

thanks for help!