List<Order> list = Ebean.find(Order.class) .fetch("details", new FetchConfig().query()) .order().asc("id") .order().desc("details.id") .findList();
So in the example above, there is a query join on "details" ... and this means the order().desc("details.id") needs to be removed from the main query and onto the secondary query (+query join).
This is also the same with filterMany.
List<Customer> list3 = Ebean.find(Customer.class) .fetch("orders") .filterMany("orders").eq("status", Order.Status.NEW) .order().desc("orders.id") .findList();
The filterMany uses a query join ... and so the above .order().desc("orders.id") is removed from the main query and put onto the filterMany query.
See TestQueryFetchJoinWithOrder
Fixed in HEAD.