I couldn't tell from the Documentation rather the Interface solution proxy="IClassA" fixes both the inability to cast subclassed proxies and the ability to compare class references
http://www.hibernate.org/hib_docs/refer ... ce-proxies
**Casting example where Proxy is the class itself
----------------------------------------------------------
Cat cat = (Cat) session.load(Cat.class, id); // instantiate a proxy (does not hit the db)
if ( cat.isDomesticCat() ) { // hit the db to initialize the proxy
DomesticCat dc = (DomesticCat) cat; // Error!
....
}
**Interface Casting example
----------------------------------------------------------
ICat cat = (ICat) session.load(Cat.class, catid);
Iterator iter = session.iterate("from cat in class eg.Cat where cat.name='fritz'");
ICat fritz = (ICat) iter.next();
Anyone have any ideas if I will be able to cast the ICat to an IAnimal and back and forth with the interfaces?