.setMaxRows(40)
.findList();
for (Order order : orders) {
Customer customer = order.getCustomer();
Address billingAddress = customer.getBillingAddress();
if (billingAddress != null) {
billingAddress.getCity();
}
Address shippingAddress = customer.getShippingAddress();
if (shippingAddress != null) {
shippingAddress.getCity();
}
List<OrderDetail> details = order.getDetails();
for (OrderDetail orderDetail : details) {
orderDetail.getUnitPrice();
orderDetail.getProduct().getName();