Back Forum Reply New

ConstraintViolationException doesn't rollback the transaction

Hello,

I have the exactly same problem as seen in this thread: showthread.php?t=66984

Except it occurs with Spring Framework amp; 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=quot;truequot; 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.
¥
Back Forum Reply New