473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

hIBERNATE MAP PROBLEM

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
Oct 26 '07 #1
0 1354

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: JDPope | last post by:
I have a situation which I cannot get a good lead on how to resolve. One of the applications I support uses the Hibernate software to generate SQL. The app is JAVA with JDBC. In testing the users...
1
by: chandukandula | last post by:
Hi Already my application in Struts using JDBC.At present my application is implemented in Struts with hibernate So i am not changing the SQL queries converting to the like this String...
1
by: fibit | last post by:
hey guys i have a couple of problems with my fairly new laptop (Acer 5051) and needed some advice, afta some googling i found this place! i have had my laptop a few months now and brough it with...
6
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using Hibernate framework in my project. This is my configuration in my "hibernate.cfg.xml" file. <property name="hibernate.c3p0.max_size">25</property> <property...
3
by: altafur | last post by:
hi, i am using java with hibernate . i want to run a hibernate order by query thru java. i have written the query in hibernate.hbm.xml file. the query is as follows: query: SELECT distinct...
0
by: neuraljay | last post by:
hi everyone. I am trying to build a jsp using webwork, hibernate and mysql. And right now I am doing its unit testing. Everytime I run the test I am getting this error: Error JDBC exception on...
1
by: ashi1290 | last post by:
I am getting this error..... Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:120)...
2
oll3i
by: oll3i | last post by:
I have hibernate plugin for eclipse (org.hibernate.eclipse_3.2.3.GA) it came together with eclipse europa , but when i do the import to use hibernate import org.hibernate.Session; import...
15
oll3i
by: oll3i | last post by:
Thank you for the last post :) now another problem when i flush the session hibernate throws nullpointerexception my code looks as follows import org.hibernate.Session; import...
1
by: CatchSandeepVaid | last post by:
I have posted this question in hibernate forums also.. As this forum is related to java, i am posting it here also ... In hibernate, presently one-to-one associations are fetched non-lazily... I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.