I am trying to load my users table relations using custom event in backendless 4.0 using sync.
The result for each related table sync call is a java map:
List<Map> tableACollection = Backendless.Data.of("TableA").find(dataQueryBuilderA);
List<Map> tableBCollection = Backendless.Data.of("TableB").find(dataQueryBuilderB);
List<Map> tableCCollection = Backendless.Data.of("TableC").find(dataQueryBuilderC);
List<Map> tableDCollection = Backendless.Data.of("TableD").find(dataQueryBuilderD);
Which i am putting in a Map as below to return to the client invoking the custom event:
HashMap<String, List<Map>> result = new HashMap<String, List<Map>>();
result.put("tableACollectionKey", tableACollection);
result.put("tableBCollectionKey", tableBCollection);
result.put("tableCCollectionKey", tableCCollection);
result.put("tableDCollectionKey", tableDCollection);
return result;
I need to get TableA as a List as below but i am getting unchecked cast warning that result has raw type
Backendless.Events.dispatch( "MyCustomEvent", args, new AsyncCallback <Map>()
{
@Override
public void handleResponse( Map result )
{
List<TableA> tableAList = (List<TableA>) result.get("tableACollectionKey");
// i need to get TableA as a List here but getting unchecked cast warning that result has raw type
}
});
How do you get table objects on the client side using custom events?
Backendless.Events.dispatch does not seem to support Multimap
Regards,
George