HHH-10706 - Correct native queries that fail when using a case-sensitive database dialect.

This commit is contained in:
Naros 2016-04-21 15:56:42 -05:00 committed by Chris Cranford
parent 59a6ac9ce5
commit b2e7bee556
3 changed files with 6 additions and 6 deletions

View File

@ -99,10 +99,10 @@ public class EnumSet extends BaseEnversJPAFunctionalTestCase {
public void testEnumRepresentation() {
EntityManager entityManager = getEntityManager();
List<Object> enums1 = entityManager.createNativeQuery(
"SELECT enums1 FROM EnumSetEntity_enums1_AUD ORDER BY rev ASC"
"SELECT enums1 FROM EnumSetEntity_enums1_AUD ORDER BY REV ASC"
).getResultList();
List<Object> enums2 = entityManager.createNativeQuery(
"SELECT enums2 FROM EnumSetEntity_enums2_AUD ORDER BY rev ASC"
"SELECT enums2 FROM EnumSetEntity_enums2_AUD ORDER BY REV ASC"
).getResultList();
entityManager.close();

View File

@ -453,17 +453,17 @@ public class DefaultValueComponents extends BaseEnversJPAFunctionalTestCase {
+ expectedId.toString()
).getSingleResult();
Number auditCount = (Number) em.createNativeQuery(
"select count(ID) from DefaultValueComponent_AUD s where s.id = "
"select count(id) from DefaultValueComponent_AUD s where s.id = "
+ expectedId.toString()
).getSingleResult();
String comp2Str1Rev1 = (String) em
.createNativeQuery(
"select COMP2_STR1 from DefaultValueComponent_AUD s where rev=1 and s.id = "
"select COMP2_STR1 from DefaultValueComponent_AUD s where REV=1 and s.id = "
+ expectedId.toString()
).getSingleResult();
String comp2Str1Rev2 = (String) em
.createNativeQuery(
"select COMP2_STR1 from DefaultValueComponent_AUD s where rev=2 and s.id = "
"select COMP2_STR1 from DefaultValueComponent_AUD s where REV=2 and s.id = "
+ expectedId.toString()
).getSingleResult();
assert Long.valueOf( 1L ).equals( entCount );

View File

@ -45,7 +45,7 @@ public class EnumTypeTest extends BaseEnversJPAFunctionalTestCase {
EntityManager entityManager = getEntityManager();
entityManager.getTransaction().begin();
List<Object[]> values = entityManager.createNativeQuery(
"SELECT enum1, enum2 FROM EnumTypeEntity_AUD ORDER BY rev ASC"
"SELECT enum1, enum2 FROM EnumTypeEntity_AUD ORDER BY REV ASC"
).getResultList();
entityManager.getTransaction().commit();
entityManager.close();