-->
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 session and rollbacks
PostPosted: Mon Aug 10, 2009 5:10 pm 
Newbie

Joined: Mon Jul 20, 2009 6:17 pm
Posts: 5
Hi,
I have a class to manage the hibernate session and everything was going ok until i had an exception and the rollback didn't work.
Let me explain my application: I have a table Person that is related with PhonesNumber table in a one-to-many relationship (using annotations)

If I make an insertion of a person with phone numbers and for example the phone number is null, it would return an exception on the data base. My problem is that the table phone numbers don't insert anything because of the error and it is ok but after the rollback is executed the table Person has the new register. As a result my data base gets dirty.


Top
 Profile  
 
 Post subject: Re: Hibernate session and rollbacks
PostPosted: Mon Aug 10, 2009 6:10 pm 
Newbie

Joined: Mon Jul 20, 2009 6:17 pm
Posts: 5
I found my error.
My data base tables had the MYISAM type and it does not support transactions. I changed to INNODB and now everything works fine. :)

I hope this help someone else.


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.