hello , i’ve create an api serivces that takes an arraylist , useing the below code
public String sendOrders(List<Orders> orderList) {
String Clause = "";
String WhereClause = "objectId ='" + Clause + "'";
String UserId = "";
String ResturantName = "";
ArrayList<OrderDetail> orderDetails = new ArrayList<OrderDetail>();
Orders orderOnline = new Orders();
System.out.println("OrderSize " + orderList.size());
for (int i = 0; i < orderList.size(); i++) {
String restaurantId = orderList.get(i).getObjectId();
UserId = orderList.get(i).getCustomer().getObjectId();
ResturantName = orderList.get(i).getRestaurant().getName();
Orders orderNumbered = Backendless.Persistence.of(Orders.class).save(orderList.get(i));
when i try it in coderunner it works like a charm but when i deploy it to the cloud i get the following error when i call the function, am using the models downloaded with code generation ,
BackendlessFault{ code: '0', message: 'Type:"java.lang.RuntimeException", Description:"unable to adapt parameter to a method argument type. Unable to adapt array to data type: class ibrahimomer.red_dlvry.Models.MenusItems", ExceptionClass:"ServiceException" {Msg:"none", Cause:"none"}', detail: 'Type:"java.lang.RuntimeException", Description:"unable to adapt parameter to a method argument type. Unable to adapt array to data type: class ibrahimomer.red_dlvry.Models.MenusItems"
the MenuItems class is the one downloaded from backendless and everything works fine when i try it with code runner .