From 24841e4e59ae698558b0f7c832cdfcf13dfd5615 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Tue, 24 Nov 2015 20:53:29 -0800 Subject: [PATCH] HHH-10328 : Unit test failure due to database identifier too long (cherry picked from commit 24ee708de72e744a39064229f9c14c30e61c21f0) --- .../elementCollection/CollectionElementConversionTest.java | 2 ++ .../jpa/test/criteria/SuperclassCollectionTest.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/converter/elementCollection/CollectionElementConversionTest.java b/hibernate-core/src/test/java/org/hibernate/test/converter/elementCollection/CollectionElementConversionTest.java index 37fcb48da2..de8c5b11dd 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/converter/elementCollection/CollectionElementConversionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/converter/elementCollection/CollectionElementConversionTest.java @@ -22,6 +22,7 @@ import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Id; +import javax.persistence.Table; import org.hibernate.Session; import org.hibernate.testing.TestForIssue; @@ -72,6 +73,7 @@ public class CollectionElementConversionTest extends BaseNonConfigCoreFunctional } @Entity + @Table(name = "Customer") public static class Customer { @Id private Integer id; diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/SuperclassCollectionTest.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/SuperclassCollectionTest.java index ed90ed5349..f5b38ed57c 100644 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/SuperclassCollectionTest.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/SuperclassCollectionTest.java @@ -101,7 +101,7 @@ public class SuperclassCollectionTest extends BaseEntityManagerFunctionalTestCas return query.getResultList(); } - @Entity + @Entity(name="Address") public static class Address { @Id @GeneratedValue @@ -127,7 +127,7 @@ public class SuperclassCollectionTest extends BaseEntityManagerFunctionalTestCas protected abstract List
getLocalAddresses(); } - @Entity + @Entity(name="Person") public static class Person extends PersonBase { @OneToMany(cascade = CascadeType.ALL) @JoinTable(name = "person_localaddress") @@ -139,7 +139,7 @@ public class SuperclassCollectionTest extends BaseEntityManagerFunctionalTestCas } } - @Entity + @Entity(name="OtherSubclass") public static class OtherSubclass extends PersonBase { @OneToMany(cascade = CascadeType.ALL) @JoinTable(name = "other_person_localaddress")