Wednesday, July 11, 2012

Hibernate Polymorphism

ClassOne and its sub-class ClassOneDotOne.

If you only want ClassOne, not ClassOneDotOne in your Hibernate query results, you will need to define
  1. if hbm.xml,
  2. if annotation, @hibernate.class polymorphism="explicit"
Yes, it is that simple.