Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6773

Derby throws plain SQLIntegrityConstraintViolationException

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10.2.0
    • Fix Version/s: 10.12.1.2
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
      Windows 7 x86_64, Java 1.6.0.45

      Description

      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.

        Attachments

        1. DERBY6733Repro.java
          2 kB
          Mamta A. Satoor
        2. ant -verbose build all.txt
          637 kB
          Abhinav Gupta
        3. SamePackage.diff
          3 kB
          Bryan Pendleton
        4. SharedException.diff
          7 kB
          Bryan Pendleton
        5. CallSuper.diff
          23 kB
          Bryan Pendleton
        6. generateOnClientDoesntWork.diff
          26 kB
          Bryan Pendleton
        7. subPart2.diff
          77 kB
          Abhinav Gupta
        8. subPart1.diff
          2 kB
          Abhinav Gupta
        9. addToTestSuite.diff
          3 kB
          Bryan Pendleton
        10. switchArgs.diff
          7 kB
          Bryan Pendleton
        11. IntegrityConstraint.diff
          14 kB
          Abhinav Gupta
        12. passesTests.diff
          16 kB
          Bryan Pendleton

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                mac777 Abhinav Gupta
                Reporter:
                jochen@apache.org Jochen Wiedmann
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: