Hello,
I have this situation:
- Object "Basket" that has more Object "ServiceBasket" (one-to-many).
The map that I use is this :
<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>
I want to know if is possible to associate, serviceBasket to Basket, with the field "bookid" of Basket.
How can I do??
Pls, help me..it's urgent!
Thanks & Regards,
Francesco