Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: reference to a different object
PostPosted: Mon Nov 03, 2008 1:56 pm 

Joined: Fri Oct 31, 2008 11:35 am
Posts: 12
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.

  <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"/>
<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 class="Comercio.Anexo22.Aduana" insert="false" lazy="false" name="aduanaDespacho" update="false" not-null="false">
          <column name="ID_ADUANA_DESPACHO"/>
          <column name="SECCION_DESPACHO"/>


<?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">
  <class dynamic-insert="false" dynamic-update="false" mutable="true" name="Comercio.Anexo22.Aduana" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="ADUANA">
      <key-property column="ID_ADUANA" name="idAduana"/>
      <key-property column="SECCION" name="seccion"/>
    <property column="DENOMINACION" name="denominacion"/>

how can i resolve this problem???

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.