Author: ShaunA
Date: 2011-10-17 07:50:15 -0400 (Mon, 17 Oct 2011)
New Revision: 20981
Modified:
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/exception/TemplatedViolatedConstraintNameExtracter.java
Log:
fixes for JBPAPP-7294
Modified:
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java
===================================================================
---
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java 2011-10-16
14:23:41 UTC (rev 20980)
+++
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/dialect/Oracle8iDialect.java 2011-10-17
11:50:15 UTC (rev 20981)
@@ -375,7 +375,7 @@
public String extractConstraintName(SQLException sqle) {
int errorCode = JDBCExceptionHelper.extractErrorCode(sqle);
if ( errorCode == 1 || errorCode == 2291 || errorCode == 2292 ) {
- return extractUsingTemplate( "constraint (", ") violated",
sqle.getMessage() );
+ return extractUsingTemplate( "(", ")", sqle.getMessage() );
}
else if ( errorCode == 1400 ) {
// simple nullability constraint
Modified:
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/exception/TemplatedViolatedConstraintNameExtracter.java
===================================================================
---
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/exception/TemplatedViolatedConstraintNameExtracter.java 2011-10-16
14:23:41 UTC (rev 20980)
+++
core/tags/hibernate-3.3.2.GA_JBPAPP-7294/core/src/main/java/org/hibernate/exception/TemplatedViolatedConstraintNameExtracter.java 2011-10-17
11:50:15 UTC (rev 20981)
@@ -47,7 +47,7 @@
}
int start = templateStartPosition + templateStart.length();
- int end = message.indexOf( templateEnd, start );
+ int end = message.lastIndexOf( templateEnd, start );
if ( end < 0 ) {
end = message.length();
}
Show replies by date