Hello,
I have the map xml below.
I want that my object Basket, is related to serviceBasket not with the field "id" of basket, but with the filed "bookid" of basket.
How can I do?
this is the file xml :
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<!-- it.eminds.data.Basket root -->
<class name="it.eminds.data.Basket" table="Basket">
<id name="id" type="string">
<column name="id" length="50"/>
<generator class="assigned"/>
</id>
<property name="utente" type="string" >
<column name="utente" not-null="false" sql-type="text"/>
</property>
<property name="carteDiCredito" type="string" >
<column name="carteDiCredito" not-null="false" sql-type="text"/>
</property>
<property name="cliente" type="string" >
<column name="cliente" not-null="false" sql-type="text"/>
</property>
<property name="spedizione" type="string" >
<column name="spedizione" not-null="false" sql-type="text"/>
</property>
<property name="bookID" column="bookID" type="string" length="16"/>
<property name="dataBooking" column="dataBooking" type="timestamp"/>
<property name="bookId_Gest" column="bookId_Gest" type="string" length="16"/>
<property name="pos" type="string" >
<column name="pos" not-null="false" sql-type="text"/>
</property>
<!-- tabella Array servizi type="boolean" -->
<bag name="servizi" cascade="all">
<key column="uid"/>
<one-to-many class="it.eminds.data.ServiceBasket"/>
</bag>
</class>
<class name="it.eminds.data.ServiceBasket" table="serviceBasket">
<id name="id" unsaved-value="0">
<generator class="increment"/>
</id>
<property name="pax" type="string" >
<column name="pax" not-null="false" sql-type="text"/>
</property>
<property name="RQBook" type="string" >
<column name="RQBook" not-null="false" sql-type="text"/>
</property>
<property name="RSBook" type="string">
<column name="RSBook" not-null="false" sql-type="text"/>
</property>
<property name="RSPrev" type="string">
<column name="RSPrev" not-null="false" sql-type="text"/>
</property>
<property name="Type" column="Type" type="integer"/>
<property name="idServizio" column="idServizio" type="integer"/>
<property name="failed" column="failed" type="string" length="12" />
<property name="invoiceNumber" column="invoiceNumber" type="string" length="12" />
<property name="notaNumber" column="notaNumber" type="string" length="12" />
<property name="startDate" column="startDate" type="timestamp"/>
<property name="correlation" column="correlation" type="string" length="10" />
</class>
</hibernate-mapping>
|