[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-84) No ConstraintViolationException thrown with HSQL database
Davide Angelocola (JIRA)
noreply at atlassian.com
Thu Apr 24 15:05:33 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30064 ]
Davide Angelocola commented on HHH-84:
--------------------------------------
Hi,
I'm using hibernate 3.2.5 and hsqldb 1.8.0.7. ConstraintViolationException is not throwned for id of type java.lang.String. Hsqldb however report this the constraints violation as showed by this simple testcase:
create table "PUBLIC".test
(
id VARCHAR not null,
primary key (id)
)
INSERT INTO TEST VALUES('a')
INSERT INTO TEST VALUES('a')
Error code -104, SQL state 23000: Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_48
Hope it helps.
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list