jakartaee / jakartaee/persistence
Improve exceptions to support identifying more specific exceptions such as "constraint violation" and "duplicate key"
- Dominant language
- Java
- Stars
- 268
- Forks
- 78
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 13
Description
Currently there seems to be no easy way to check a PersistenceException to see if is a "Constraint violation" exception etc.
It would be good to have a provider agnostic and database agnostic way to as least easily identify "Constraint violation" exceptions and ideally a more specific "Unique constraint violation".
One possible approach would be to extend the exception hierarchy.
Contributor guide
Research direction
Start by reviewing PersistenceException and the existing exception hierarchy. Define how provider-agnostic and database-agnostic identification should work for constraint violations, including the proposed unique-constraint case. Done means the issue's requirements are resolved through an agreed exception design.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100