-->
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: Problem with the <LIST>
PostPosted: Wed Feb 02, 2005 4:28 am 
Newbie

Joined: Wed Feb 02, 2005 3:57 am
Posts: 2
Location: Austria
Hallo

I'm new in hibernate an a have a problem with <List>.

I have two tables : BEPARTNERROLLE (PK PARPAROLLEIDPARTNERROLLE) and BENOTIZ (PK NOTIZID, FK PARPAROLLEIDPARTNERROLLE) and the relation 1 to many uni.

<list name="getNotizList" table="BENOTIZ">
<key column="PARPAROLLEIDPARTNERROLLE" />
<index column="NOTIZID/>
<one-to-many clas="BENOITZ">
</list>

If I want to insert a row in table BEPARTNERROLLE with a List the first is ok. The second insert gets a failure.
This are the 3 SQL Statements.

2005-02-01 14:08:44,750 [main] DEBUG net.sf.hibernate.SQL - insert into BEPARTNERROLLE (UPDATECOUNT, PARTNEROLLENARTKURZ, gueltigVonDAT, gueltigBisDAT, stornoJN, stornogrund, PARTNERROLLE_TYPE, PARPARROLLEIDPARTNERROLLE) values (?, ?, ?, ?, ?, ?, 'PRO', ?)

2005-02-01 14:08:44,750 [main] DEBUG net.sf.hibernate.SQL - insert into BENOTIZ (PARPARROLLEIDPARTNER, PARPARROLLEIDPARTNERROLLE, VERSICHERUNGSTRAEGERCODE, BETREFF, NOTIZTEXT, ERFASSUNGSDAT, NOTIZID) values (?, ?, ?, ?, ?, ?, ?)

2005-02-01 14:08:44,765 [main] DEBUG net.sf.hibernate.SQL - update BENOTIZ set PARPAROLLEIDPARTNERROLLE=?, NOTIZID=? where NOTIZID=?

The third SQL Statement is not clear. Why the update of the field "NOTIZID" ???????
The update ONLY of the field "PARPAROLLEIDPARTNERROLLE" (this the foreign Key) is correct.

Can anyone help me.

Hibernate version: 2.1.4

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using: Oracle 9.2

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

_________________
best regards

Georg


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.