-->
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: .hibernate.exception.ConstraintViolationException:
PostPosted: Thu Jun 29, 2006 8:08 am 
Newbie

Joined: Thu Jun 29, 2006 7:30 am
Posts: 3
Location: PAKISTAN
Dear All,
Be happy,
here are some question regarding Hibernate.
kindly give the answer with reasoning / litter bit explanation Thnaks in advance

Q-1 :

if we create one-to-many relation in mapping,is its mandatory also tell the many end about one, mean also define in mapping many-to-one

Q-2 :

i m using a legacy system (as/400), get data from as40 and fill some object
now i wanna delete existing record (having ID)
if we delete multiple records using session.delete(class,objID)

its only delete one record
then i insert new records from the object which i fill from as400
it send Error like
.hibernate.exception.ConstraintViolationException: could not update:

but i provide all information regard FK

kind some one send sample code and reading material which support me


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 29, 2006 10:43 am 
Newbie

Joined: Wed Feb 08, 2006 3:57 pm
Posts: 16
A-1:
No it isn't mandatory.
But as far as I understand the information about the association is usually stored on "many" side.
So if you do not specify the relationship on the side which is responsible for "knowing" the association you may have problems with persisting those associations.
A-2:
Please provide more data: your model mapping and log.


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.