Skip to content

Commit 24ee708

Browse files
committed
HHH-10328 : Unit test failure due to database identifier too long
1 parent a2026c3 commit 24ee708

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hibernate-core/src/test/java/org/hibernate/test/converter/elementCollection/CollectionElementConversionTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import javax.persistence.EnumType;
2323
import javax.persistence.Enumerated;
2424
import javax.persistence.Id;
25+
import javax.persistence.Table;
2526

2627
import org.hibernate.Session;
2728
import org.hibernate.testing.TestForIssue;
@@ -72,6 +73,7 @@ public void testElementCollectionConversion() {
7273
}
7374

7475
@Entity
76+
@Table(name = "Customer")
7577
public static class Customer {
7678
@Id
7779
private Integer id;

hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/SuperclassCollectionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private List<Object> find(Class<?> clazz, int id, String path) {
101101
return query.getResultList();
102102
}
103103

104-
@Entity
104+
@Entity(name="Address")
105105
public static class Address {
106106
@Id
107107
@GeneratedValue
@@ -127,7 +127,7 @@ public abstract static class PersonBase {
127127
protected abstract List<Address> getLocalAddresses();
128128
}
129129

130-
@Entity
130+
@Entity(name="Person")
131131
public static class Person extends PersonBase {
132132
@OneToMany(cascade = CascadeType.ALL)
133133
@JoinTable(name = "person_localaddress")
@@ -139,7 +139,7 @@ public List<Address> getLocalAddresses() {
139139
}
140140
}
141141

142-
@Entity
142+
@Entity(name="OtherSubclass")
143143
public static class OtherSubclass extends PersonBase {
144144
@OneToMany(cascade = CascadeType.ALL)
145145
@JoinTable(name = "other_person_localaddress")

0 commit comments

Comments
 (0)