[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-84?page=com...
]
Baptiste MATHUS commented on HHH-84:
------------------------------------
Hi,
I found this problem with every HSQL DB version. I'm logging it here, though I think
it might rather be a problem in the SQLException thrown by the HSQLDB engine.
In fact, I just tested many versions of HSQLDB with a testcase (I tested 1.7.3.3 and many
1.8.0.x : 1.8.0.7 for example).
The problem is that Hibernate can correctly wrap the exception in a
ConstraintViolationException since the SQLException thrown by HSQLDB has an Sqlcode=0 and
SqlState is null ! (In my case, this is a foreign key constraint, I'm attaching the
testcase).
So, a bug in the hsql jdbc driver, not in hibernate, I guess. Anyone confirm this?
No ConstraintViolationException thrown with HSQL database
---------------------------------------------------------
Key: HHH-84
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-84
Project: Hibernate3
Issue Type: Bug
Components: core
Environment: Hibernate version:3.0-beta1
Database:HSQL1.7.2
Reporter: Marcel Schroer
Assignee: Emmanuel Bernard
Priority: Minor
Fix For: 3.0 beta 2
When a unique constraint violation is thrown by the HSQL database
(java.sql.SQLException: Unique constraint violation: SYS_CT_171 in statement), the
SQLException is wrapped in a GenericSQLException instead of the
ConstraintViolationException that I expected.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira