From 3d356c2800f853f6b4c00aa63c98927d32ca914f Mon Sep 17 00:00:00 2001 From: brmeyer Date: Wed, 12 Sep 2012 10:14:23 -0400 Subject: [PATCH] HHH-7569 Correct multiple failures/issues in hibernate-core-master-matrix CI job --- .../derivedidentities/e1/b/specjmapid/lazy/order_orm.xml | 2 +- .../test/annotations/enumerated/FirstLetterType.java | 5 ++++- .../test/annotations/enumerated/LastNumberType.java | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/lazy/order_orm.xml b/hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/lazy/order_orm.xml index 259e3cba10..4342e6d3c1 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/lazy/order_orm.xml +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/lazy/order_orm.xml @@ -22,7 +22,7 @@ - + diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/FirstLetterType.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/FirstLetterType.java index 83ab61f2ee..4237928d7d 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/FirstLetterType.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/FirstLetterType.java @@ -35,7 +35,10 @@ public class FirstLetterType extends org.hibernate.type.EnumType { } else { String enumString = ( (Enum) value ).name(); - st.setObject( index, enumString.charAt( 0 ), sqlTypes()[0] ); + // Using setString here, rather than setObject. A few JDBC drivers + // (Oracle, DB2, and SQLServer) were having trouble converting + // the char to VARCHAR. + st.setString( index, enumString.substring( 0, 1 ) ); } } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/LastNumberType.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/LastNumberType.java index 65e38525f9..ad9c7656e3 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/LastNumberType.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/enumerated/LastNumberType.java @@ -36,7 +36,10 @@ public class LastNumberType extends org.hibernate.type.EnumType { else { String enumString = ( (Enum) value ).name(); - st.setObject( index, enumString.charAt( enumString.length() - 1 ), sqlTypes()[0] ); + // Using setString here, rather than setObject. A few JDBC drivers + // (Oracle, DB2, and SQLServer) were having trouble converting + // the char to VARCHAR. + st.setString( index, enumString.substring( enumString.length() - 1 ) ); } } }