Hey there,
we are using Version 3.0.11 of your Android SDK and have the following problem: We cannot fetch all items of one class by using the find method.
E.g. this code:
BackendlessDataQuery query = new BackendlessDataQuery();
QueryOptions options = new QueryOptions();
options.setSortBy(Arrays.asList("street"));
query.setQueryOptions(options);
BackendlessCollection<MyClass> result = Backendless.Persistence.of( MyClass.class ).find( query );
Results in this error: BackendlessException{ code: ‘Internal client exception’, message: ‘null’ }
However, using this code it works:
MyClass.findAsync(query, new AsyncCallback<BackendlessCollection<MyClass>>() {
@Override
public void handleResponse(BackendlessCollection< MyClass > response) {
int size = response.getCurrentPage().size();
if (size > 0) {
elements.addAll(response.getData());
response.nextPage(this);
} else {
EventBus.getDefault().post(new BackendlessCollectionEvent(response, elements));
}
}
@Override
public void handleFault(BackendlessFault fault) {
EventBus.getDefault().post(new BackendlessFaultEvent(fault));
}
});
Of course, since the paging needs multiple requests, it is slower than using a simple find. I am using this in a similar way on iOS and there it works just fine. Any hints?
Thanks a lot!
Best regards,
Martin