HHH-7569 Correct multiple failures/issues in

hibernate-core-master-matrix CI job
This commit is contained in:
brmeyer 2012-09-10 19:04:25 -04:00
parent ae59da9322
commit 5306dda1c9
4 changed files with 15 additions and 6 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 ) );
}
}
}

View File

@ -23,6 +23,8 @@
*/
package org.hibernate.jpa.test.criteria;
import static org.junit.Assert.fail;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
@ -31,14 +33,13 @@ import javax.persistence.criteria.CriteriaUpdate;
import javax.persistence.criteria.Root;
import javax.persistence.criteria.Subquery;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.jpa.test.metamodel.AbstractMetamodelSpecificTest;
import org.hibernate.jpa.test.metamodel.Customer;
import org.hibernate.jpa.test.metamodel.Customer_;
import org.hibernate.testing.SkipForDialect;
import org.junit.Test;
import static org.junit.Assert.fail;
/**
* @author Steve Ebersole
*/
@ -174,6 +175,8 @@ public class ManipulationCriteriaTest extends AbstractMetamodelSpecificTest {
}
@Test
// MySQL does not allow "delete/update from" and subqueries to use the same table
@SkipForDialect(MySQLDialect.class)
public void testDeleteWithUnCorrelatedSubquery() {
CriteriaBuilder builder = entityManagerFactory().getCriteriaBuilder();
EntityManager em = getOrCreateEntityManager();