<?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>
问题是列id_negocio,因为它在两个表中,在hibernate 3.3.1中它的工作正常但在hibernate 5中使用spring4 no。
错误是下一个:
MappingException:调用Value#setTypeUsingReflection时出错: containingClassName = [ar.com.vgmsistemas.dto.PkRubro] propertyName的= [idNegocio] role = [ar.com.vgmsistemas.dto.Rubro.id.idNegocio]: 原点(COM / AR / vgmsistemas / DTO /映射/ Rubro.hbm.xml)
非常感谢你。 问候。