Hibernate example with inheritance