Tair Sabirgaliev commented on Bug HHH-2808

After much struggle , I finally found a workaround: the issue disappears when mappings in hibernate.cfg.xml are ordered from base class to subclass:

<!-- "Right" way -->
<mapping resource="BaseClass.hbm.xml" />
<mapping resource="SubClass.hbm.xml" />

<class-cache class="com.example.BaseClass"/>
<collection-cache collection="com.example.SubClass.items"/>
<!-- "Wrong" way -->
<mapping resource="SubClass.hbm.xml" />
<mapping resource="BaseClass.hbm.xml" />

<class-cache class="com.example.BaseClass"/>
<collection-cache collection="com.example.SubClass.items"/>

Tested with hibernate-4.1.3.Final

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira