|
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.
|