-
Mar 8th, 2010, 09:42 AM
#1
ConstraintViolationException doesn't rollback the transaction
Hello,
I have the exactly same problem as seen in this thread: http://forum.springsource.org/showthread.php?t=66984
Except it occurs with Spring Framework & hibernate3 not Spring Batch.
When I intentionally break a null constraint in a transaction any previous insert is not rolled back, updates are rolled back. The not-null="true" property is not specified in my hibernate mapping. If I specify it the transaction is properly rolled back as the null check is performed by hibernate, not the database.
I am relatively new to hibernate, spring and jta. Should this behavior be considered normal. Do I have to specify the not-null property for every not-nullable fields ? Any explanation is welcome
.
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules