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
|