Hi, i got two fields referenced to the same table, and in my map use this map for two fields, the problem is when i got the same value for both fields they have the same object reference but its a problem for me, i need an object for each one.
this is my map.
Code:
<hibernate-mapping>
  <class dynamic-insert="false" dynamic-update="false" mutable="true" name="Comercio.Pedimento.Pedimento" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="PEDIMENTO">
      <id column="ID_PEDIMENTO" name="idPedimento" unsaved-value="-1">
          <generator class="assigned"/>
      </id>
<many-to-one class="Comercio.Anexo22.Aduana" insert="false" lazy="false" name="aduanaEntradaSalida" update="false" not-null="false">
          <column name="ID_ADUANA"/>
          <column name="SECCION"/>
      </many-to-one>
      <many-to-one class="Comercio.Anexo22.Aduana" insert="false" lazy="false" name="aduanaDespacho" update="false" not-null="false">
          <column name="ID_ADUANA_DESPACHO"/>
          <column name="SECCION_DESPACHO"/>
      </many-to-one>
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
  <class dynamic-insert="false" dynamic-update="false" mutable="true" name="Comercio.Anexo22.Aduana" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="ADUANA">
    <composite-id>
      <key-property column="ID_ADUANA" name="idAduana"/>
      <key-property column="SECCION" name="seccion"/>
    </composite-id>
    <property column="DENOMINACION" name="denominacion"/>
  </class>
</hibernate-mapping>
how can i resolve this problem???