Neil T wrote:
Before you cast the object, what is the object's type?
You can just print it before trying the cast
Class Invoice has method:
Code:
public Partner getPartner() { ... }
This method return all Partner objects associated with this Invoice. But the Partner class is abstract! Then I try to cast real type program throw exception.
Hibernate load the Partner classes from multiple tables, but I cant resolve the real type of class. The method:
Code:
invoice.getPartner().getClass().getName()
everything return "Partner". And i lost the real type of objects.
[/code]