db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Force unique constraint to be enforced at statement execution?
Date Tue, 08 Jan 2013 19:21:47 GMT
On 1/8/13 10:46 AM, Matthew Adams wrote:
> Hi all,
>
> How do I force a unique constraint to be enforced upon statement execution
> instead of at transaction commit?
Hi Matthew,

I am not familiar with how your application stack defers constraint 
enforcement until commit time. Derby constraints are always enforced at 
statement end and never deferred to commit time. There is an outstanding 
enhancement request for deferring enforcement: 
https://issues.apache.org/jira/browse/DERBY-532. If you run in 
autocommit mode, statement and transaction boundaries coincide. More 
information on Derby constraints can be found in the section titled 
"CONSTRAINT clause" in the Derby Reference Manual.

Sorry that this does not address your problem,
-Rick
> I'm using Spring Data JPA over DataNucleus&  Derby (embedded), and Spring's
> persistence exception translation proxy is not translating the unique
> constraint exception because it's happening at transaction commit instead of
> when the statement is executed.
>
> Thanks,
> Matthew
>
>
>
>
> --
> View this message in context: http://apache-database.10148.n7.nabble.com/Force-unique-constraint-to-be-enforced-at-statement-execution-tp126304.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>


Mime
View raw message