From 0fb19fd4fb676baae4c54bd12ef7b0e654ba676c Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Thu, 6 Jan 2022 18:26:05 +0100 Subject: [PATCH] Get rid of column names that are problematic on H2 2.0.202+ --- .../orm/test/annotations/query/Attrvalue.java | 4 +++- .../lazy/LazyLoadingByEnhancerSetterTest.java | 4 ++-- .../enhancement/lazy/proxy/RoleEntity.java | 2 ++ .../lazy/proxy/SpecializedEntity.java | 2 +- .../orm/test/comments/TestEntity.java | 2 ++ .../orm/test/comments/TestEntity2.java | 2 ++ .../EntityLoadedInTwoPhaseLoadTest.java | 2 +- .../CollectionMapWithComponentValueTest.java | 2 ++ .../orm/test/hql/fetchAndJoin/Child.java | 2 ++ .../orm/test/hql/fetchAndJoin/Entity1.java | 2 ++ .../orm/test/hql/fetchAndJoin/Entity2.java | 2 ++ .../orm/test/hql/fetchAndJoin/Entity3.java | 2 ++ .../orm/test/hql/fetchAndJoin/GrandChild.java | 2 ++ .../orm/test/hql/fetchAndJoin/Parent.java | 2 ++ .../orm/test/join/OuterJoinTest.java | 2 ++ .../beanvalidation/BeanValidationTest.java | 4 ++-- .../tck2_2/TableGeneratorVisibilityTest.java | 4 ++-- .../components/joins/ManyToOneType.java | 2 ++ .../criteria/selectcase/SelectCaseTest.java | 3 +++ .../simplecase/BasicSimpleCaseTest.java | 2 ++ .../orm/test/jpa/metamodel/Entity1.java | 2 ++ .../orm/test/jpa/metamodel/Entity2.java | 2 ++ .../orm/test/jpa/metamodel/Entity3.java | 2 ++ .../ElementCollectionTests.java | 5 +++-- .../org/hibernate/orm/test/math/Math.hbm.xml | 2 +- .../orm/test/optlock/Document.hbm.xml | 4 ++-- .../criteria/internal/hhh14197/Employee.java | 2 +- .../EmbeddableWithPluralAttributeTest.java | 2 ++ .../schemavalidation/ViewValidationTest.java | 6 +++-- ...ntCollectionBasicNonUniqueIdWhereTest.java | 22 +++++++++---------- ...ollectionBasicNonUniqueIdWhereTest.hbm.xml | 6 ++--- ...ntCollectionBasicNonUniqueIdWhereTest.java | 16 +++++++------- .../query/OrderByThreeEntityTest.java | 3 +++ .../entities/components/Component4.java | 3 +++ .../embeddable/ListEqualsHashCodeTest.java | 2 ++ .../embeddable/ListNoEqualsHashCodeTest.java | 2 ++ .../embeddable/MapEqualsHashCodeTest.java | 2 ++ .../embeddable/MapNoEqualsHashCodeTest.java | 2 ++ .../embeddable/SetEqualsHashCodeTest.java | 2 ++ .../embeddable/SetNoEqualsHashCodeTest.java | 2 ++ .../VersionsJoinTableRangeTestEntity.java | 2 ++ .../AbstractEntityWithChangesQueryTest.java | 2 ++ ...StrategyComponentCollectionRevEndTest.java | 2 ++ .../AuditOverrideAuditJoinTableTest.java | 4 ++++ .../auditoverride/EmbeddableTest.java | 2 ++ 45 files changed, 111 insertions(+), 39 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Attrvalue.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Attrvalue.java index 3438ecd22e..1567647f61 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Attrvalue.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Attrvalue.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.annotations.query; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -15,7 +16,8 @@ public class Attrvalue { @Id @GeneratedValue private Long id; - + + @Column(name = "val") private String value; public Long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java index 2087efdab6..dd4b55ac6f 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingByEnhancerSetterTest.java @@ -123,7 +123,7 @@ public class LazyLoadingByEnhancerSetterTest extends BaseCoreFunctionalTestCase @ElementCollection( fetch = FetchType.EAGER ) @MapKeyColumn( name = "NAME" ) @Lob - @Column( name = "VALUE", length = 65535 ) + @Column( name = "PARAM_VAL", length = 65535 ) private Map parameters = new HashMap<>(); @Override @@ -153,7 +153,7 @@ public class LazyLoadingByEnhancerSetterTest extends BaseCoreFunctionalTestCase @ElementCollection( fetch = FetchType.EAGER ) @MapKeyColumn( name = "NAME" ) @Lob - @Column( name = "VALUE", length = 65535 ) + @Column( name = "PARAM_VAL", length = 65535 ) @Override public Map getParameters() { return parameterMap; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/RoleEntity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/RoleEntity.java index 304fe3dbb9..f9b8e5ce81 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/RoleEntity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/RoleEntity.java @@ -16,6 +16,7 @@ package org.hibernate.orm.test.bytecode.enhancement.lazy.proxy; import java.io.Serializable; import jakarta.persistence.Basic; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.Inheritance; @@ -34,6 +35,7 @@ import org.hibernate.annotations.LazyToOneOption; public class RoleEntity extends ModelEntity implements Serializable { @Basic + @Column(name = "val") Short value; @ManyToOne(fetch = FetchType.LAZY) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SpecializedEntity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SpecializedEntity.java index b6327dd03a..aadef05697 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SpecializedEntity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SpecializedEntity.java @@ -45,7 +45,7 @@ public class SpecializedEntity implements Serializable { this.id = id; } - @Column(name="Value") + @Column(name="TheValue") String value; @ManyToOne(fetch=FetchType.LAZY) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity.java b/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity.java index 245c1ccee1..b05a6630d0 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.comments; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -17,6 +18,7 @@ public class TestEntity { @Id private String id; + @Column(name = "val") private String value; public TestEntity() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity2.java b/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity2.java index fafc868726..f9382ffbd5 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity2.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/comments/TestEntity2.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.comments; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -17,6 +18,7 @@ public class TestEntity2 { @Id private String id; + @Column(name = "val") private String value; public String getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java index c5f8b399a9..3dc9cbdd59 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/fetchprofiles/EntityLoadedInTwoPhaseLoadTest.java @@ -90,7 +90,7 @@ public class EntityLoadedInTwoPhaseLoadTest extends BaseCoreFunctionalTestCase { @GeneratedValue private long id; - @Column(name = "value", nullable = false) + @Column(name = "val", nullable = false) private String value; public Finish() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CollectionMapWithComponentValueTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CollectionMapWithComponentValueTest.java index 489de5137a..30f74e30fa 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CollectionMapWithComponentValueTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/CollectionMapWithComponentValueTest.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.hql; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -281,6 +282,7 @@ public class CollectionMapWithComponentValueTest extends BaseCoreFunctionalTestC @Embeddable public static class EmbeddableValue { + @Column(name = "val") Integer value; EmbeddableValue() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Child.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Child.java index 79a6a59c52..5d673ac5f8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Child.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Child.java @@ -26,6 +26,7 @@ package org.hibernate.orm.test.hql.fetchAndJoin; import java.util.HashSet; import java.util.Set; import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; @@ -52,6 +53,7 @@ public class Child { this.value = value; } + @Column(name = "val") private String value; public long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity1.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity1.java index 829cacad8f..fcfb481294 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity1.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity1.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.hql.fetchAndJoin; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -41,6 +42,7 @@ public class Entity1 { @JoinColumn(name="entity2_id", nullable = false) private Entity2 entity2; + @Column(name = "val") private String value; public long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity2.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity2.java index 17e62c0efa..92aa94dc2c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity2.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity2.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.hql.fetchAndJoin; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; @@ -42,6 +43,7 @@ public class Entity2 { @JoinColumn(name="entity3_id") private Entity3 entity3; + @Column(name = "val") private String value; public long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity3.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity3.java index f496eef550..d913b4e1f9 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity3.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Entity3.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.hql.fetchAndJoin; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -35,6 +36,7 @@ public class Entity3 { @GeneratedValue private long id; + @Column(name = "val") private String value; public long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/GrandChild.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/GrandChild.java index 747045c8d4..970a0b5469 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/GrandChild.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/GrandChild.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.hql.fetchAndJoin; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -35,6 +36,7 @@ public class GrandChild { @GeneratedValue private long id; + @Column(name = "val") private String value; public GrandChild() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Parent.java b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Parent.java index a023ac46f1..9ee6b28e88 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Parent.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/hql/fetchAndJoin/Parent.java @@ -26,6 +26,7 @@ package org.hibernate.orm.test.hql.fetchAndJoin; import java.util.HashSet; import java.util.Set; import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; @@ -45,6 +46,7 @@ public class Parent { @JoinColumn private Set children = new HashSet(); + @Column(name = "val") private String value; public Parent() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/join/OuterJoinTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/join/OuterJoinTest.java index 78d06fd4f9..904a8e4626 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/join/OuterJoinTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/join/OuterJoinTest.java @@ -384,6 +384,7 @@ public class OuterJoinTest { @Column(name = "key_id") Long key; + @Column(name = "val") String value; @ManyToOne(optional = false) @@ -458,6 +459,7 @@ public class OuterJoinTest { @Column(name = "key_id") private Long key; + @Column(name = "val") private String value; public Association() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/beanvalidation/BeanValidationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/beanvalidation/BeanValidationTest.java index 37784f872d..058f8bdcab 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/beanvalidation/BeanValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/beanvalidation/BeanValidationTest.java @@ -90,10 +90,10 @@ public class BeanValidationTest { public void testTitleColumnHasExpectedLength(EntityManagerFactoryScope scope) { scope.inTransaction( entityManager -> { - int len = (Integer) entityManager.createNativeQuery( + Number len = (Number) entityManager.createNativeQuery( "select CHARACTER_MAXIMUM_LENGTH from INFORMATION_SCHEMA.COLUMNS c where c.TABLE_NAME = 'CUPHOLDER' and c.COLUMN_NAME = 'TITLE'" ).getSingleResult(); - assertEquals(64, len); + assertEquals(64, len.intValue()); } ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java index e626ffbafd..88ee3b88e3 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/tck2_2/TableGeneratorVisibilityTest.java @@ -75,7 +75,7 @@ public class TableGeneratorVisibilityTest extends BaseCoreFunctionalTestCase { name = "table-generator", table = "table_identifier", pkColumnName = "identifier", - valueColumnName = "value", + valueColumnName = "val", allocationSize = 5 ) public static class TestEntity3 { @@ -84,7 +84,7 @@ public class TableGeneratorVisibilityTest extends BaseCoreFunctionalTestCase { name = "table-generator-2", table = "table_identifier_2", pkColumnName = "identifier", - valueColumnName = "value", + valueColumnName = "val", allocationSize = 5 ) @GeneratedValue(strategy = GenerationType.TABLE, generator = "table-generator") diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/components/joins/ManyToOneType.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/components/joins/ManyToOneType.java index 36371f658f..352a86927e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/components/joins/ManyToOneType.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/components/joins/ManyToOneType.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.jpa.criteria.components.joins; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -18,6 +19,7 @@ public class ManyToOneType { @Id @GeneratedValue public Long id; + @Column(name = "val") private String value; public ManyToOneType() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/selectcase/SelectCaseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/selectcase/SelectCaseTest.java index 647d14b242..dba1d3b1fa 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/selectcase/SelectCaseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/selectcase/SelectCaseTest.java @@ -24,6 +24,8 @@ package org.hibernate.orm.test.jpa.criteria.selectcase; import java.util.List; + +import jakarta.persistence.Column; import jakarta.persistence.EntityManager; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; @@ -124,6 +126,7 @@ public class SelectCaseTest extends BaseEntityManagerFunctionalTestCase { private Long id; @Enumerated(EnumType.STRING) + @Column(name = "val") private EnumValue value; } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/simplecase/BasicSimpleCaseTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/simplecase/BasicSimpleCaseTest.java index 6fd332806a..e85552ac96 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/simplecase/BasicSimpleCaseTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/simplecase/BasicSimpleCaseTest.java @@ -13,6 +13,7 @@ import static org.junit.Assert.assertNull; import java.util.List; import jakarta.persistence.AttributeConverter; +import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; import jakarta.persistence.EntityManager; @@ -311,6 +312,7 @@ public class BasicSimpleCaseTest extends BaseEntityManagerFunctionalTestCase { @Convert(converter = TestEnumConverter.class) private TestEnum enumField; + @Column(name = "val") private Long value; public long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity1.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity1.java index fc78f875c0..378c1a9611 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity1.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity1.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.jpa.metamodel; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; @@ -39,5 +40,6 @@ public class Entity1 { @JoinColumn(name="entity2_id", nullable = false) private Entity2 entity2; + @Column(name = "val") private String value; } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity2.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity2.java index 0bc49de5e1..0093988668 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity2.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity2.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.jpa.metamodel; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; @@ -39,5 +40,6 @@ public class Entity2 { @JoinColumn(name="entity3_id") private Entity3 entity3; + @Column(name = "val") private String value; } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity3.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity3.java index b9cf7b03e2..d2bbe4de2b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity3.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/Entity3.java @@ -23,6 +23,7 @@ */ package org.hibernate.orm.test.jpa.metamodel; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; @@ -33,5 +34,6 @@ public class Entity3 { @Id private long id; + @Column(name = "val") private String value; } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java index 86d30465b0..923fe114f7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/converted/converter/elementCollection/ElementCollectionTests.java @@ -103,6 +103,7 @@ public class ElementCollectionTests { * Non-serializable value type. */ public static class ValueType { + @Column(name = "val") private final String value; public ValueType(String value) { @@ -155,7 +156,7 @@ public class ElementCollectionTests { @Convert( converter = ValueTypeConverter.class ) @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "entity_set", joinColumns = @JoinColumn(name = "entity_id", nullable = false)) - @Column(name = "value", nullable = false) + @Column(name = "val", nullable = false) public Set set = new HashSet(); /** @@ -168,7 +169,7 @@ public class ElementCollectionTests { @ElementCollection(fetch = FetchType.LAZY) @CollectionTable(name = "entity_map", joinColumns = @JoinColumn(name = "entity_id", nullable = false)) @MapKeyColumn(name = "map_key", nullable = false) - @Column(name = "value", nullable = false) + @Column(name = "val", nullable = false) public Map map = new HashMap(); public TheEntity() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/math/Math.hbm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/math/Math.hbm.xml index f9d811ac7a..dc22691391 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/math/Math.hbm.xml +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/math/Math.hbm.xml @@ -20,7 +20,7 @@ - + diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/optlock/Document.hbm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/optlock/Document.hbm.xml index ce7b4ed272..47c9f402d8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/optlock/Document.hbm.xml +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/optlock/Document.hbm.xml @@ -27,7 +27,7 @@ - + @@ -42,7 +42,7 @@ - + diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh14197/Employee.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh14197/Employee.java index 68b775274d..8772ae190d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh14197/Employee.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/hhh14197/Employee.java @@ -88,7 +88,7 @@ public class Employee extends AbstractPersistent { @ElementCollection @MapKeyColumn(name = "name", length = 180) - @Column(name = "value", nullable = false) + @Column(name = "val", nullable = false) public Map getAnnotations() { return this.annotations; } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/EmbeddableWithPluralAttributeTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/EmbeddableWithPluralAttributeTest.java index 4fa5c8bf51..60f52dda54 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/EmbeddableWithPluralAttributeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/EmbeddableWithPluralAttributeTest.java @@ -3,6 +3,7 @@ package org.hibernate.orm.test.query.hql; import java.util.ArrayList; import java.util.List; import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -81,6 +82,7 @@ public class EmbeddableWithPluralAttributeTest { @Embeddable public static class B { + @Column(name = "val") private String value; @OneToMany(cascade = CascadeType.ALL) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/ViewValidationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/ViewValidationTest.java index 7915ee9819..24617875cc 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/ViewValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/ViewValidationTest.java @@ -110,9 +110,10 @@ public class ViewValidationTest extends BaseCoreFunctionalTestCase { @Id private Long id; - @Column(nullable = false) + @Column(name = "the_key", nullable = false) private String key; + @Column(name = "val") private String value; public Long getId() { @@ -146,9 +147,10 @@ public class ViewValidationTest extends BaseCoreFunctionalTestCase { @Id private Long id; - @Column(nullable = false) + @Column(name = "the_key", nullable = false) private String key; + @Column(name = "val") private String value; public Long getId() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyElementCollectionBasicNonUniqueIdWhereTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyElementCollectionBasicNonUniqueIdWhereTest.java index 3ce910038a..fe4393871e 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyElementCollectionBasicNonUniqueIdWhereTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/where/annotations/LazyElementCollectionBasicNonUniqueIdWhereTest.java @@ -78,35 +78,35 @@ public class LazyElementCollectionBasicNonUniqueIdWhereTest extends BaseCoreFunc session.createNativeQuery( "create table COLLECTION_TABLE( " + "MAIN_ID integer not null, MAIN_CODE varchar(10) not null, " + - "VALUE varchar(10) not null, VALUE_CODE varchar(10) not null, " + - "primary key (MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE))" + "VAL varchar(10) not null, VALUE_CODE varchar(10) not null, " + + "primary key (MAIN_ID, MAIN_CODE, VAL, VALUE_CODE))" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'high', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'medium', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'low', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'medium', 'SIZE' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'BUILDING', 'high', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'BUILDING', 'small', 'SIZE' )" ).executeUpdate(); @@ -226,7 +226,7 @@ public class LazyElementCollectionBasicNonUniqueIdWhereTest extends BaseCoreFunc name = "COLLECTION_TABLE", joinColumns = { @JoinColumn( name = "MAIN_ID" ) } ) - @Column( name="VALUE") + @Column( name="VAL") @Where( clause = "MAIN_CODE='MATERIAL' AND VALUE_CODE='SIZE'") @Immutable public Set getSizesFromCombined() { @@ -283,7 +283,7 @@ public class LazyElementCollectionBasicNonUniqueIdWhereTest extends BaseCoreFunc name = "COLLECTION_TABLE", joinColumns = { @JoinColumn( name = "MAIN_ID" ) } ) - @Column( name="VALUE") + @Column( name="VAL") @Where( clause = "MAIN_CODE='BUILDING' AND VALUE_CODE='SIZE'") @Immutable public Set getSizesFromCombined() { @@ -298,7 +298,7 @@ public class LazyElementCollectionBasicNonUniqueIdWhereTest extends BaseCoreFunc name = "COLLECTION_TABLE", joinColumns = { @JoinColumn( name = "MAIN_ID" ) } ) - @Column( name="VALUE") + @Column( name="VAL") @Where( clause = "MAIN_CODE='BUILDING' AND VALUE_CODE='RATING'" ) @Immutable public Set getRatingsFromCombined() { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.hbm.xml b/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.hbm.xml index 70daec0e8d..9e7038b5d0 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.hbm.xml +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.hbm.xml @@ -15,7 +15,7 @@ - + @@ -35,13 +35,13 @@ - + - + diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.java index ee678de435..72ebb37fb7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/where/hbm/LazyElementCollectionBasicNonUniqueIdWhereTest.java @@ -74,35 +74,35 @@ public class LazyElementCollectionBasicNonUniqueIdWhereTest extends BaseCoreFunc session.createNativeQuery( "create table COLLECTION_TABLE( " + "MAIN_ID integer not null, MAIN_CODE varchar(10) not null, " + - "VALUE varchar(10) not null, VALUE_CODE varchar(10) not null, " + - "primary key (MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE))" + "VAL varchar(10) not null, VALUE_CODE varchar(10) not null, " + + "primary key (MAIN_ID, MAIN_CODE, VAL, VALUE_CODE))" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'high', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'medium', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'low', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'MATERIAL', 'medium', 'SIZE' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'BUILDING', 'high', 'RATING' )" ).executeUpdate(); session.createNativeQuery( - "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VALUE, VALUE_CODE) " + + "insert into COLLECTION_TABLE(MAIN_ID, MAIN_CODE, VAL, VALUE_CODE) " + "VALUES( 1, 'BUILDING', 'small', 'SIZE' )" ).executeUpdate(); diff --git a/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByThreeEntityTest.java b/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByThreeEntityTest.java index 98c23cef33..8281018538 100644 --- a/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByThreeEntityTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/query/OrderByThreeEntityTest.java @@ -12,6 +12,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Objects; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; @@ -75,6 +76,7 @@ public class OrderByThreeEntityTest extends BaseEnversJPAFunctionalTestCase { public static class Key { @Id private Integer id; + @Column(name = "val") private String value; public Key() { @@ -134,6 +136,7 @@ public class OrderByThreeEntityTest extends BaseEnversJPAFunctionalTestCase { public static class Item { @Id private Integer id; + @Column(name = "val") private String value; public Item() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/entities/components/Component4.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/entities/components/Component4.java index e1dde63177..bd6d09807e 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/entities/components/Component4.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/entities/components/Component4.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.envers.entities.components; +import jakarta.persistence.Column; import jakarta.persistence.Embeddable; import org.hibernate.envers.Audited; @@ -17,7 +18,9 @@ import org.hibernate.envers.NotAudited; @Embeddable @Audited public class Component4 { + @Column(name = "the_key") private String key; + @Column(name = "val") private String value; @NotAudited diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListEqualsHashCodeTest.java index 56dc2e3c37..77c30339d6 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListEqualsHashCodeTest.java @@ -11,6 +11,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -169,6 +170,7 @@ public class ListEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListNoEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListNoEqualsHashCodeTest.java index 44d70e56a0..6161cad447 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListNoEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/ListNoEqualsHashCodeTest.java @@ -10,6 +10,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -168,6 +169,7 @@ public class ListNoEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapEqualsHashCodeTest.java index e2c2d08291..de374a72b7 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapEqualsHashCodeTest.java @@ -11,6 +11,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -174,6 +175,7 @@ public class MapEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapNoEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapNoEqualsHashCodeTest.java index 04bec83c2b..77301bcf5d 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapNoEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/MapNoEqualsHashCodeTest.java @@ -10,6 +10,7 @@ import java.io.Serializable; import java.util.HashMap; import java.util.Map; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -171,6 +172,7 @@ public class MapNoEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetEqualsHashCodeTest.java index bfd6652b49..e22aa3823a 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetEqualsHashCodeTest.java @@ -11,6 +11,7 @@ import java.util.HashSet; import java.util.Objects; import java.util.Set; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -175,6 +176,7 @@ public class SetEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetNoEqualsHashCodeTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetNoEqualsHashCodeTest.java index 3c2a4f6000..f5b6686e2a 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetNoEqualsHashCodeTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/collection/embeddable/SetNoEqualsHashCodeTest.java @@ -10,6 +10,7 @@ import java.io.Serializable; import java.util.HashSet; import java.util.Set; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -188,6 +189,7 @@ public class SetNoEqualsHashCodeTest extends BaseEnversJPAFunctionalTestCase { @Embeddable public static class Emb implements Serializable { + @Column(name = "val") private String value; public Emb() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/naming/VersionsJoinTableRangeTestEntity.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/naming/VersionsJoinTableRangeTestEntity.java index 73866cda63..110236d68f 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/naming/VersionsJoinTableRangeTestEntity.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/naming/VersionsJoinTableRangeTestEntity.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.envers.integration.naming; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; @@ -22,6 +23,7 @@ import jakarta.persistence.Table; public class VersionsJoinTableRangeTestEntity extends VersionsJoinTableRangeTestEntitySuperClass { + @Column(name = "val") private String value; /** diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/query/AbstractEntityWithChangesQueryTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/query/AbstractEntityWithChangesQueryTest.java index 2afef84407..fd5a336e89 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/query/AbstractEntityWithChangesQueryTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/query/AbstractEntityWithChangesQueryTest.java @@ -11,6 +11,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @@ -168,6 +169,7 @@ public abstract class AbstractEntityWithChangesQueryTest extends BaseEnversJPAFu @GeneratedValue private Integer id; private String name; + @Column(name = "val") private Integer value; Simple() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/strategy/ValidityAuditStrategyComponentCollectionRevEndTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/strategy/ValidityAuditStrategyComponentCollectionRevEndTest.java index 30368eb54a..6d95d2b9e5 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/strategy/ValidityAuditStrategyComponentCollectionRevEndTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/strategy/ValidityAuditStrategyComponentCollectionRevEndTest.java @@ -12,6 +12,7 @@ import java.util.List; import java.util.Map; import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Embeddable; import jakarta.persistence.Entity; @@ -183,6 +184,7 @@ public class ValidityAuditStrategyComponentCollectionRevEndTest extends BaseEnve @Audited public static class Item { private String name; + @Column(name = "val") private Integer value; Item() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/AuditOverrideAuditJoinTableTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/AuditOverrideAuditJoinTableTest.java index 9ca9bdb489..d14d364020 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/AuditOverrideAuditJoinTableTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/AuditOverrideAuditJoinTableTest.java @@ -12,6 +12,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import jakarta.persistence.Column; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; import jakarta.persistence.Id; @@ -228,6 +229,7 @@ public class AuditOverrideAuditJoinTableTest extends BaseEnversJPAFunctionalTest @Entity(name = "OOE") @Audited public static class OtherAuditedEntity extends SuperClass { + @Column(name = "val") private String value; @NotAudited private String notAuditedValue; @@ -302,6 +304,7 @@ public class AuditOverrideAuditJoinTableTest extends BaseEnversJPAFunctionalTest ) }) public static class OtherOverrideAuditedEntity extends NonAuditedSuperClass { + @Column(name = "val") private String value; @NotAudited private String notAuditedValue; @@ -333,6 +336,7 @@ public class AuditOverrideAuditJoinTableTest extends BaseEnversJPAFunctionalTest ) }) public static class OtherAuditParentsAuditEntity extends NonAuditedSuperClass { + @Column(name = "val") private String value; @NotAudited private String notAuditedValue; diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/EmbeddableTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/EmbeddableTest.java index 5e44b16127..a74c5fe4d4 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/EmbeddableTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/superclass/auditoverride/EmbeddableTest.java @@ -6,6 +6,7 @@ */ package org.hibernate.orm.test.envers.integration.superclass.auditoverride; +import jakarta.persistence.Column; import jakarta.persistence.Embeddable; import jakarta.persistence.Embedded; import jakarta.persistence.Entity; @@ -246,6 +247,7 @@ public class EmbeddableTest extends BaseEnversJPAFunctionalTestCase { @Embeddable @Audited public static class AuditedEmbeddable extends SimpleAbstractMappedSuperclass { + @Column(name = "val") private Integer value; public Integer getValue() {