HHH-7569 Correct multiple failures/issues in

hibernate-core-master-matrix CI job
This commit is contained in:
brmeyer 2012-09-12 10:14:23 -04:00
parent 501b5d0a0b
commit 3d356c2800
3 changed files with 9 additions and 3 deletions

View File

@ -22,7 +22,7 @@
</many-to-one>
<many-to-one name="customer" fetch="EAGER">
<join-column name="CI_CUSTOMERID" insertable="false"/>
<join-column name="CI_CUSTOMERID" insertable="false" nullable="false"/>
<cascade>
<cascade-merge/>
</cascade>

View File

@ -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 ) );
}
}
}

View File

@ -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 ) );
}
}
}