Hollo, i have the class Rubro:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="ar.com.vgmsistemas.dto">
<class name="Rubro" table="segmento">
<composite-id class="PkRubro" name="id" unsaved-value="undefined">
<key-property name="idNegocio" column="id_negocio"></key-property>
<key-property name="idRubro" column="id_segmento"/>
</composite-id>
<property column="de_segmento" name="descripcion" type="string" />
<many-to-one class="Negocio" name="negocio" column="id_negocio" insert="false" update="false" not-null="true"/>
</class>
</hibernate-mapping>
The problem is the column id_negocio, because it is in both tables, in hibernate 3.3.1 its works correctly but in hibernate 5 with spring4 no.
The error is the next:
MappingException: Error calling Value#setTypeUsingReflection: containingClassName=[ar.com.vgmsistemas.dto.PkRubro], propertyName=[idNegocio], role=[ar.com.vgmsistemas.dto.Rubro.id.idNegocio] : origin(com/ar/vgmsistemas/dto/mapping/Rubro.hbm.xml)
From already thank you very much. Regards.