HHH-12211 - Test failure on MariaDB when the database charset is configured to UTF8

This commit is contained in:
Andrea Boriero 2018-01-10 17:48:16 +00:00
parent 43cae5f92a
commit ea6b90c053
5 changed files with 15 additions and 8 deletions

View File

@ -6,6 +6,8 @@ import java.io.Serializable;
@Embeddable
public class EmployeeId implements Serializable {
@Column(length = 32)
String firstName;
@Column(length = 32)
String lastName;
}

View File

@ -1,10 +1,12 @@
package org.hibernate.test.annotations.derivedidentities.e3.b3;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
public class DependentId implements Serializable {
@Column(length = 32)
String name;
EmployeeId empPK;
}

View File

@ -1,10 +1,13 @@
package org.hibernate.test.annotations.derivedidentities.e3.b3;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
public class EmployeeId implements Serializable {
@Column(length = 32)
String firstName;
@Column(length = 32)
String lastName;
}

View File

@ -43,10 +43,10 @@ public class CharacterArrayIdTest extends BaseCoreFunctionalTestCase {
for ( int i = 0; i < 3; i++ ) {
DemoEntity entity = new DemoEntity();
entity.id = new Character[] {
(char) ( i + 1 ),
(char) ( i + 2 ),
(char) ( i + 3 ),
(char) ( i + 4 )
(char) ( i + 'a' ),
(char) ( i + 'b' ),
(char) ( i + 'c' ),
(char) ( i + 'd' )
};
entity.name = "Simple name " + i;
s.persist( entity );

View File

@ -43,10 +43,10 @@ public class PrimitiveCharacterArrayIdTest extends BaseCoreFunctionalTestCase {
for ( int i = 0; i < 3; i++ ) {
DemoEntity entity = new DemoEntity();
entity.id = new char[] {
(char) ( i + 1 ),
(char) ( i + 2 ),
(char) ( i + 3 ),
(char) ( i + 4 )
(char) ( i + 'a' ),
(char) ( i + 'b' ),
(char) ( i + 'c' ),
(char) ( i + 'd' )
};
entity.name = "Simple name " + i;
s.persist( entity );