JsonWriteOptions options = JsonWriteOptions.parsePath("*,details(id,orderQty,product(id))");
String jsonOrder = jsonContext.toJson(order, options);
System.out.println(jsonOrder);
Order o2 = jsonContext.toBean(Order.class, jsonOrder);
Customer customer = o2.getCustomer();
BeanDescriptor<Customer> custDesc = server.getBeanDescriptor(Customer.class);
Assert.assertTrue(custDesc.isReference(((EntityBean)customer)._ebean_getIntercept()));