db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhinav Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6773) Derby throws plain SQLIntegrityConstraintViolationException
Date Sat, 15 Aug 2015 23:11:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14698481#comment-14698481

Abhinav Gupta commented on DERBY-6773:

Hi Bryan,

I have attached a patch that tries to fix the problem of different
arguments of Integrity violations. Currently in this patch, nothing is done
for LANG_NULL_INTO_NON_NULL violation that has no constraint or table name,
Should we create a SQLIntegrityViolationException instead of
DerbySQLIntegrityViolationException ?

Also I have assumed at the moment that only LANG_FK_VIOLATION and
have constraint name before table name, are there more such violations ?
I'm a bit unsure on how to check if there are other such violations with
the reversed order.



On Sun, Aug 16, 2015 at 1:55 AM, Bryan Pendleton (JIRA) <jira@apache.org>

> Derby throws plain SQLIntegrityConstraintViolationException
> -----------------------------------------------------------
>                 Key: DERBY-6773
>                 URL: https://issues.apache.org/jira/browse/DERBY-6773
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions:
>         Environment: Windows 7 x86_64, Java
>            Reporter: Jochen Wiedmann
>            Assignee: Abhinav Gupta
>            Priority: Minor
>         Attachments: CallSuper.diff, DERBY6733Repro.java, SamePackage.diff, SharedException.diff,
addToTestSuite.diff, ant -verbose build all.txt, generateOnClientDoesntWork.diff, subPart1.diff,
subPart2.diff, switchArgs.diff
> If a unique constraint is violated by an insert statement, then Derby throws an SQLIntegrityConstraintViolationException.
The error message contains, in particular, the constraint name and the table name.
> To distinguish between cases with various constraints, Derby should instead throw a subclass
of SQLIntegrityConstraintViolationException, with methods like getConstraintName(), and getTableName().
> See also https://hibernate.atlassian.net/browse/HHH-9516.

This message was sent by Atlassian JIRA

View raw message