-->
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: index column not updated
PostPosted: Mon Aug 20, 2007 7:21 am 
Newbie

Joined: Mon Aug 20, 2007 7:04 am
Posts: 1
Hello!

I have a many-to-many mapping with a list.

<list name="bestandteil_belegungen table="AS_BELEGUNG_GRUPPEN_HBEZ " >

<key column="OBER_ID" />
<list-index column="unter_id_ord" base="1" />

<many-to-many column="UNTER_ID"
class="Bestandteil_belegungen" />
</list>

If I reorder the elements in the list the index-column (OBER_ID) is not updated but other column (UNTER_ID).

HibernateStatement:
update AS_BELEGUNG_GRUPPEN_HBEZ set UNTER_ID=? where OBER_ID=? and unter_id_ord=?


This behavior produces "unique constraint violations" because UNTER_ID refers to primary-key of the basetable of the view AS_BELEGUNG_GRUPPEN_HBEZ.


How is it possible to make Hibernate update the index column?!

regards
anton8


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.