spring-projects / spring-projects/spring-data-relational

Feature: Expose names of violated constraints in o.s.d.DataIntegrityViolationException

Open
#2,322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Feature request:

Hibernate has a ViolatedConstraintNameExtractor interface and uses dialect-specific implementations to expose the constraint name in its ConstraintViolationException.

Could we have something similar in spring-data-relational, or if we have that already, could someone please point me there?

A possible Workaround is of course to write my own constraint name extractor and get some inspiration from the EXTRACTER (sic!) instances of the hibernate dialects.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue's Hibernate ViolatedConstraintNameExtractor and ConstraintViolationException references, then compare them with spring-data-relational's DataIntegrityViolationException handling. Done means defining and exposing violated constraint names with dialect-specific extraction comparable to Hibernate; the issue does not name specific Spring Data files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.