HHH-10544 - Fix MySQL failing tests

This commit is contained in:
Andrea Boriero 2016-02-18 15:53:41 +00:00
parent 4dfb0f1a54
commit 4c4f11264d
2 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.SqlResultSetMapping;
import javax.persistence.SqlResultSetMappings;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@ -104,8 +105,10 @@ public class ConstructorResultNativeQueryTest extends BaseEntityManagerFunctiona
)
}
)
@Table(name = "person")
public static class Person {
@Id
@Column(name = "id")
private Integer id;
@Column( name = "p_name" )
private String name;

View File

@ -10,6 +10,7 @@ import static org.junit.Assert.assertEquals;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.ColumnResult;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
@ -29,7 +30,7 @@ import org.junit.Test;
public class ScalarResultNativeQueryTest extends BaseEntityManagerFunctionalTestCase {
@Entity(name="Person")
@Table(name="PERSON")
@Table(name="person")
@NamedNativeQuery(name = "personAge", query = "select p.age from person p", resultSetMapping = "ageStringMapping")
@SqlResultSetMapping(name = "ageStringMapping", columns = { @ColumnResult(name = "age", type = String.class) })
public static class Person {
@ -38,6 +39,7 @@ public class ScalarResultNativeQueryTest extends BaseEntityManagerFunctionalTest
private Integer id;
@SuppressWarnings("unused")
@Column(name = "age")
private int age;
public Person() {