I'm not sure if this is a known issue or not. Have you tried using the latest Hibernate 5.0 branch snapshot? http://ci.hibernate.org/job/hibernate-orm-5.0-h2/ pushes a new Hibernate snapshot after every code change pushed to the Hibernate 5.0 branch.
Snapshot jars are at https://repository.jboss.org/nexus/content/repositories/snapshots/org/hibernate/. You could either rebuild your own local (test) WildFly build with "./build.sh clean install -DskipTests=true -Dversion.org.hibernate=5.0.9-SNAPSHOT" or hack the current WildFly copy of the Hibernate jars to use the snapshot.
In case it is helpful, a more exact set of links to the snapshot jars are contained in the Hibernate Jenkins output here.
Hi @Scott Marlow,
I have tried as per your suggestion but the problem still persist. Even i have tried with the following latest snapshots.
FYI, the BaseClass is an abstract class annotated with @MappedSuperClass , BaseClass extends one more abstract class that too mapped with @MappedSuperClass.
No idea what changed from hibernate version 4.3.10 (packed with wildfly 9.0.2) onward.
I could able to narrow down the issue after enabling trace log, there was one more class which is extending Sample Class and its mapped using hbm.xml like below
<joined-subclass name="BloodSample" table="tbl_blood_sample"
<key column="ID" />
<property name="sampleNo" column="sampleNo"/>
The moment i removed this relation hbm it started working... Still wondering why its happening now which was not in older version of hibernate.
Hi Nick, the code involved in building entity hierarchies changed in 5.0, so you're probably running into a bug that got introduced. It would help a lot if you could open a Hibernate Jira (Hibernate ORM - Hibernate JIRA) and attach your test case.