-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate doubt in mapping
PostPosted: Thu Oct 25, 2007 9:56 am 
Newbie

Joined: Tue Oct 16, 2007 5:56 am
Posts: 10
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.