Fiz um mapeamento de subclasses usando joined-subclass ele funciona normalmente pra salvar mas o session.get() retorna null
org.springframework.orm.ObjectRetrievalFailureException: Object of class [br.com.xxx.CampoData] with identifier [1]: not found
at br.com.xxx.CampoDataDAOHibernate.getCampoData(CampoDataDAOHibernate.java:38)
at br.com.xxx.CampoDataManagerImpl.getCampoData(CampoDataManagerImpl.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy5.getCampoData(Unknown Source)
at
......
hbm resumido
<hibernate-mapping
package="xxxxxxxxxxx">
<class name="Campo" table="CAMPO">
<id name="id" column="ID_CAMPO" type="long" unsaved-value="0">
<generator class="hilo">
<param name="max_lo">100</param>
</generator>
</id>
<property name="nome" type="string" column="NOME" />
<many-to-one name="tab" class="Tab" column="ID_TAB"
not-null="true" />
<joined-subclass name="CampoTexto" table="CAMPO_TEXTO">
<key column="ID_CAMPO" />
<property name="tamanhoMaximo" type="short"
column="TAMANHO_MAXIMO" />
<property name="valor" type="string" column="VALOR" />
<property name="valorDefault" type="string"
column="VALOR_DEFAULT" />
</joined-subclass>
</class>
</hibernate-mapping>