HHH-7569 Correct multiple failures/issues in
hibernate-core-master-matrix CI job
This commit is contained in:
parent
ae59da9322
commit
5306dda1c9
|
@ -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>
|
||||
|
|
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue