Issue Type: Improvement Improvement
Affects Versions: 4.1.12
Assignee: Unassigned
Attachments: PatchedMySQLDialect.java
Components: core
Created: 18/Jun/13 8:34 AM
Description:

This is my first Hibernate issue ticket so apologies if the format is not ideal.

I have an Hibernate application that works against PostgreSQL 9.1 and when I attempted to test it against a MySQL database I hit a minor issue where ConstraintViolationException exceptions do not have the constraint name populated.

Looking at the PostgreSQL81Dialect and the MySQL5Dialect, it appears that the MySQL5Dialect is missing a ViolatedConstraintNameExtracter.

I created a small workaround dialect class that extends MySQL5Dialect and adds a simple ViolatedConstraintNameExtracter. It is pretty basic but works for my use case.

It would be nice if someone, who knows more about MySQL, could take a look at it and possibly include the necessary to MySQL5Dialect at some point.

I have attached my class for review.

Environment: hibernate-core 4.1.12.Final
MySQL Ver 14.14 Distrib 5.5.31
jdk1.6.0_35
Project: Hibernate ORM
Labels: hibernate core dialect
Priority: Minor Minor
Reporter: Justin Subert
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira