-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: RFE: ConstraintViolationException.getConstraintName()
PostPosted: Mon Apr 18, 2005 1:06 pm 
Regular
Regular

Joined: Tue Mar 22, 2005 2:27 am
Posts: 62
Hi,

We would like to be able to rely on ConstraintViolationException.getConstraintName() in our application.
The problem appears to be that different DBs and/or drivers will return the constraint in a different case.


e.g. It seems that no matter how we specify the constraints in the DDL, HSQLDB (1_8_0_RC9) always returns the constraint name in upper-case, and Informix (IBM JDBC 2.21 JC6) always in lower-case.

Currently, we have worked around this limitation by extending the Dialects to override getViolatedConstraintNameExtracter() to make it always return the constraint name in upper case.
That way, the application can rely on ConstraintViolationException.getConstraintName() in a database-agnostic way.

My question is:

Could this change be incorporated into the existing Dialects that ship with hibernate? (I'd rather not maintain this independently unless I need to)

Also, I've implemented buildSQLExceptionConverter(), etc. for InformixDialect (based on HSQLDialect's implementation).
How would I go about contributing this? Should I create a JIRA issue to submit my suggested changes?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 1:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Quote:
Could this change be incorporated into the existing Dialects that ship with hibernate? (I'd rather not maintain this independently unless I need to)

I'd rather not. Add it as a JIRA enhancement request and see if anyone votes for it.

Quote:
Also, I've implemented buildSQLExceptionConverter(), etc. for InformixDialect (based on HSQLDialect's implementation).
How would I go about contributing this? Should I create a JIRA issue to submit my suggested changes?

Yes, thats the correct process. Add the *patch* as a JIRA enhancement request.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 18, 2005 5:30 pm 
Regular
Regular

Joined: Tue Mar 22, 2005 2:27 am
Posts: 62
FYI, I've opened the following JIRA issues:

http://opensource.atlassian.com/project ... se/HHH-365
http://opensource.atlassian.com/project ... se/HHH-366


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.