0

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.

Joris Meys
  • 106,551
  • 31
  • 221
  • 263
Emanuel
  • 1
  • 1
  • 1
    Please describe the problem a bit more clear. Right now it's not clear what you mean with "works correctly" or what the problem with hibernate-5 axtually is. Add what you see, and what you expect to see. – Joris Meys Mar 10 '17 at 13:02
  • 1
    Hi, i edited the content. Regards. – Emanuel Mar 13 '17 at 14:12

0 Answers0