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.  [ 2 posts ] 
Author Message
 Post subject: commit de 2 tables avec contraites d'intégrité
PostPosted: Wed Jul 26, 2006 4:38 pm 
Newbie

Joined: Tue Jul 25, 2006 8:59 am
Posts: 18
Bonjour,

J'ai deux table A et B.
La B contient l'identifiant d'une ou plusieurs instances de A
B a une contraite d'intégrité : l'identifiant de A doit exister

j'ai donc une relation OnetoMany

Lorsque je fait un save d'un objet A , puis un save de plusiurs objets B qui contiennent l'identifiant A et que je fais un commit , j'ai une erreur de violation de l'intégrité au commit() me disant que le parent n'existe pas.

En effet , le commit de A n'as pas encore eu lieu mais A a été sauver pourtant.

comment faire ?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 29, 2006 10:34 am 
Newbie

Joined: Tue Jul 25, 2006 8:59 am
Posts: 18
J'ai résolu le probleme , j'avais un trigger sur la table père.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.