Open GoogleCodeExporter opened 9 years ago
Hi guys,
I get a error when i attempt use OrderFilter in order listing service. I need
return only 5 latests orders but i get a error message: Can't decode apache
map, missing key.
The code is:
OrderRemoteService oservice = RemoteServiceFactory.getOrderRemoteService();
ArrayList<OrderFilterItem> ofitens = (new ArrayList<OrderFilterItem>(0));
OrderFilterItem ofitem = new OrderFilterItem("", "", "");
ofitem.setOperator("from");
ofitem.setProperty("created_at");
ofitem.setValue( "2012-03-01 00:00:00");
OrderFilter of = new OrderFilter();
ofitens.add(ofitem);
of.setItems(ofitens);
try {
// Order order = RemoteServiceFactory.getOrderRemoteService().getById("10002334");
List<Order> ordens = oservice.list(null);
for (Order order : ordens) {
System.out.println(order.getId());
}
} catch (ServiceException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
I change the OrderFilter serialize as in attach but without sucess. Can help-me?
Original comment by deniscas...@gmail.com
on 2 Apr 2012 at 10:44
Hi,
i think your specified Operator may not work as expected. Here is some of our
working code:
OrderFilter filter = new OrderFilter();
filter.getItems().add(new OrderFilterItem("updated_at", "gt", "2012-01-01"));
In this case the Operator is "gt". In your case it should be "eq"...
Greetings
Tomislav Dedus
Original comment by Tomi.De...@googlemail.com
on 20 Jul 2012 at 7:57
Original issue reported on code.google.com by
Tomi.De...@googlemail.com
on 25 Feb 2011 at 9:03Attachments: