-->
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 delete many-to-many
PostPosted: Mon Jun 25, 2012 9:55 am 
Newbie

Joined: Mon Jun 25, 2012 9:25 am
Posts: 1
Hello!

I'm new to Hibernate and I'm having a problem with deleting an object from the database

I'm getting the following exception..org.hibernate.exception.ConstraintViolationException: Integrity constraint violation


Here it is my mapping file..

<class entity-name "toto" table="TOTO">
<id access=field column="TOTO_ID" type="string">
<generator class="uuid"/>
</id>
<list access="field" cascade="save-update,all-delete-orphan" lazy="false" name="titis" inverse="false">
<key column="TOTO_ID" not-null="true" on-delete="cascade" unique=true"/>
<list-index base="1" column="number"/>
<many-to-many
class=Titi
column="TITI"
entity-name="Titi"
lazy="false" not-found="ignore" unique="false"/>
</list>
</class>
<class dynamic-insert="true" dynamic-update="true"
entity-name="Titi"
lazt="false"
name="Titi"
..
<id access="field" column ="Titi" type="string">
<generator class="uuid"/>
</id>

.....

The relation is unidirectional..
Do you have any ideas of the problem?
Thanks for your time and in advance!


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.