I Have two tables, One “Category” with basic property columns and another “BNCImage” with ‘imageURL’ and ‘categoryConnection’ as property columns. When I try to search for the ‘categoryConnection’ with a value in the “BNCImage” to fetch the corresponding ‘imageURL’ property it shows “Fault: invalid where clause”. Below is the code for the data query.
final Future<Category> retrievedCat = new Future<Category>();
retrievedCat.set(cat);
BackendlessDataQuery dataQuery = new BackendlessDataQuery();
dataQuery.setWhereClause("categoryConnection = " + retrievedCat.get().getObjectId());
Backendless.Data.of(BNCImage.class).find(dataQuery, new LoadingCallback<BackendlessCollection<BNCImage>>(this, getString(R.string.loading_categories), true) {
@Override
public void handleResponse(BackendlessCollection<BNCImage> response) {
try {
Log.i(TAG, response.toString());
retrievedCat.get().setConnectedImage(response.getData().get(0));
adapter.notifyDataSetChanged();
} catch (InterruptedException e) {
e.printStackTrace();
}
super.handleResponse(response);
}
@Override
public void handleFault(BackendlessFault fault) {
super.handleFault(fault);
}
});
Also find attached the activity file.