lazy Loading of a field with inheritance throws a ClassCastException:
public class Customer { @ManyToOne(cascade = CascadeType.ALL) private Vehicle vehicle;}
public class Truck extends Vehicle { int capacity;}
if (customer.getVehicle() instanceof Truck) { (Truck) customer.getVehicle()).getCapacity());}throws:
Caused by: java.lang.ClassCastException: db.data.Truck$$EntityBean$ora cannot be cast to db.data.Vehicle$$EntityBean$ora
More info and an example code can be found under:https://groups.google.com/forum/?hl=de#!topic/ebean/8kO88_0VpfA