[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-1599) ConstraintViolationException returns null with PostgresDialect
Mark (JIRA)
noreply at atlassian.com
Sun Apr 1 14:53:50 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46139#comment-46139 ]
Mark edited comment on HHH-1599 at 4/1/12 1:53 PM:
---------------------------------------------------
Any update on a fix for this?
It is messy to handle constraint errors with code and it seems the only alternative is to report a general constraint error
was (Author: mcchafist):
Any update on a fix for this?
It is messy to handle constraint errors with codes and it seems the only alternative is to report a general constraint error
> ConstraintViolationException returns null with PostgresDialect
> --------------------------------------------------------------
>
> Key: HHH-1599
> URL: https://hibernate.onjira.com/browse/HHH-1599
> Project: Hibernate ORM
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3 , Postgres 8.1.2 (i686), postgresql-8.2dev-501.jdbc.jar
> Reporter: Niclas Lindberg
> Assignee: Diego Plentz
> Priority: Minor
> Attachments: HHH-1599.patch, HHH-1599-postgres-only.patch, PostgreSQLDialect.java
>
> Original Estimate: 0.05h
> Remaining Estimate: 0.05h
>
> ConstraintViolationException.getConstraintName() returns null. The problem is that the message being parsed comes from the SqlException that is the inputparameter to extractConstraintName(SqlException) in ViolatedConstraintNameExtracter.
> Solution. The message provided by sqlException.getMessage() is "batch bla bla something" but the correct Exception message to parse is sqlException.getNextException().getMessage()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list