Make sure tests work with Oracle 11
This commit is contained in:
parent
c5cd1c2664
commit
d213fff3de
|
@ -61,7 +61,7 @@ public class IdClassWithSuperclassTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "MyEntity")
|
||||||
@IdClass(ChildPrimaryKey.class)
|
@IdClass(ChildPrimaryKey.class)
|
||||||
public static class MyEntity {
|
public static class MyEntity {
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
@ -508,11 +509,11 @@ public class ExtendedEnhancementNonStandardAccessTest extends BaseCoreFunctional
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
public long id;
|
public long id;
|
||||||
|
@Column(name = "abstract_public_field")
|
||||||
public Long abstractEntityPublicField;
|
public Long abstractEntityPublicField;
|
||||||
|
@Column(name = "abstract_protected_field")
|
||||||
protected Long abstractEntityProtectedField;
|
protected Long abstractEntityProtectedField;
|
||||||
|
@Column(name = "abstract_default_field")
|
||||||
Long abstractEntityPackagePrivateField;
|
Long abstractEntityPackagePrivateField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,9 +524,13 @@ public class ExtendedEnhancementNonStandardAccessTest extends BaseCoreFunctional
|
||||||
|
|
||||||
@Entity(name = "concrete")
|
@Entity(name = "concrete")
|
||||||
public static class MyConcreteEntity extends MyAbstractConfusingEntity {
|
public static class MyConcreteEntity extends MyAbstractConfusingEntity {
|
||||||
|
@Column(name = "concrete_public_field")
|
||||||
public Long publicField;
|
public Long publicField;
|
||||||
|
@Column(name = "concrete_protected_field")
|
||||||
protected Long protectedField;
|
protected Long protectedField;
|
||||||
|
@Column(name = "concrete_default_field")
|
||||||
Long packagePrivateField;
|
Long packagePrivateField;
|
||||||
|
@Column(name = "concrete_private_field")
|
||||||
private Long privateField;
|
private Long privateField;
|
||||||
|
|
||||||
public Long getAbstractEntityPublicField() {
|
public Long getAbstractEntityPublicField() {
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "Fridge")
|
||||||
@Cacheable
|
@Cacheable
|
||||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||||
public static class Fridge {
|
public static class Fridge {
|
||||||
|
@ -145,7 +145,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "Container")
|
||||||
@BatchSize(size = 500)
|
@BatchSize(size = 500)
|
||||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||||
@Cacheable
|
@Cacheable
|
||||||
|
@ -177,7 +177,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "FruitContainer")
|
||||||
@DiscriminatorValue(value = "FRUIT_CONTAINER")
|
@DiscriminatorValue(value = "FRUIT_CONTAINER")
|
||||||
public static class FruitContainer extends Container {
|
public static class FruitContainer extends Container {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
@ -194,7 +194,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "CheeseContainer")
|
||||||
@DiscriminatorValue(value = "CHEESE_CONTAINER")
|
@DiscriminatorValue(value = "CHEESE_CONTAINER")
|
||||||
public static class CheeseContainer extends Container {
|
public static class CheeseContainer extends Container {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
@ -211,7 +211,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "Food")
|
||||||
@BatchSize(size = 500)
|
@BatchSize(size = 500)
|
||||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||||
@Cacheable
|
@Cacheable
|
||||||
|
@ -232,7 +232,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "Fruit")
|
||||||
@BatchSize(size = 500)
|
@BatchSize(size = 500)
|
||||||
@DiscriminatorValue(value = "FRUIT")
|
@DiscriminatorValue(value = "FRUIT")
|
||||||
public static class Fruit extends Food {
|
public static class Fruit extends Food {
|
||||||
|
@ -249,7 +249,7 @@ public class ManyToOneTestReusedColumn extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "Cheese")
|
||||||
@BatchSize(size = 500)
|
@BatchSize(size = 500)
|
||||||
@DiscriminatorValue(value = "CHEESE")
|
@DiscriminatorValue(value = "CHEESE")
|
||||||
public static class Cheese extends Food {
|
public static class Cheese extends Food {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import jakarta.persistence.Inheritance;
|
||||||
import jakarta.persistence.InheritanceType;
|
import jakarta.persistence.InheritanceType;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||||
|
|
||||||
|
@ -95,7 +96,8 @@ public class LazyAbstractManyToOneNoProxyTest extends BaseCoreFunctionalTestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "User")
|
||||||
|
@Table(name = "usr_tbl")
|
||||||
@Proxy(lazy = false)
|
@Proxy(lazy = false)
|
||||||
public static class User {
|
public static class User {
|
||||||
@Id
|
@Id
|
||||||
|
@ -129,7 +131,7 @@ public class LazyAbstractManyToOneNoProxyTest extends BaseCoreFunctionalTestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "ActorGroup")
|
||||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||||
@DiscriminatorColumn(name = "TYPE")
|
@DiscriminatorColumn(name = "TYPE")
|
||||||
@Proxy(lazy = false)
|
@Proxy(lazy = false)
|
||||||
|
@ -145,7 +147,7 @@ public class LazyAbstractManyToOneNoProxyTest extends BaseCoreFunctionalTestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "UserGroup")
|
||||||
@Proxy(lazy = false)
|
@Proxy(lazy = false)
|
||||||
@DiscriminatorValue("USERS")
|
@DiscriminatorValue("USERS")
|
||||||
public static class UserGroup extends ActorGroup {
|
public static class UserGroup extends ActorGroup {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import jakarta.persistence.FetchType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||||
|
|
||||||
|
@ -88,7 +89,8 @@ public class LazyManyToOneNoProxyTest extends BaseCoreFunctionalTestCase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "User")
|
||||||
|
@Table(name = "usr_tbl")
|
||||||
@Proxy(lazy = false)
|
@Proxy(lazy = false)
|
||||||
public static class User {
|
public static class User {
|
||||||
@Id
|
@Id
|
||||||
|
@ -122,7 +124,7 @@ public class LazyManyToOneNoProxyTest extends BaseCoreFunctionalTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "UserGroup")
|
||||||
@Proxy(lazy = false)
|
@Proxy(lazy = false)
|
||||||
public static class UserGroup {
|
public static class UserGroup {
|
||||||
@Id
|
@Id
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.hibernate.orm.test.embeddable;
|
package org.hibernate.orm.test.embeddable;
|
||||||
|
|
||||||
import org.hibernate.Hibernate;
|
import org.hibernate.Hibernate;
|
||||||
import org.hibernate.annotations.BatchSize;
|
|
||||||
import org.hibernate.annotations.Parent;
|
import org.hibernate.annotations.Parent;
|
||||||
|
|
||||||
import org.hibernate.testing.orm.junit.DomainModel;
|
import org.hibernate.testing.orm.junit.DomainModel;
|
||||||
|
@ -17,7 +16,6 @@ import jakarta.persistence.Embeddable;
|
||||||
import jakarta.persistence.Embedded;
|
import jakarta.persistence.Embedded;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.Inheritance;
|
import jakarta.persistence.Inheritance;
|
||||||
import jakarta.persistence.InheritanceType;
|
import jakarta.persistence.InheritanceType;
|
||||||
|
@ -81,7 +79,7 @@ public class EmbeddableWithParentWithInheritance2Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import jakarta.persistence.Embeddable;
|
||||||
import jakarta.persistence.Embedded;
|
import jakarta.persistence.Embedded;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.Inheritance;
|
import jakarta.persistence.Inheritance;
|
||||||
import jakarta.persistence.InheritanceType;
|
import jakarta.persistence.InheritanceType;
|
||||||
|
@ -80,7 +79,7 @@ public class EmbeddableWithParentWithInheritanceTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ package org.hibernate.orm.test.foreignkeys.sorting;
|
||||||
import jakarta.persistence.CascadeType;
|
import jakarta.persistence.CascadeType;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
|
||||||
|
@ -19,7 +18,7 @@ import jakarta.persistence.ManyToOne;
|
||||||
@Entity
|
@Entity
|
||||||
public class A {
|
public class A {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue
|
||||||
private int id;
|
private int id;
|
||||||
|
|
||||||
@ManyToOne(cascade = CascadeType.PERSIST)
|
@ManyToOne(cascade = CascadeType.PERSIST)
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class SelectOnlyArrayPropertyTest extends BaseEntityManagerFunctionalTest
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity
|
@Entity(name = "EntityWithIdAndIntegerArray")
|
||||||
public static class EntityWithIdAndIntegerArray {
|
public static class EntityWithIdAndIntegerArray {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
|
|
@ -22,6 +22,7 @@ import jakarta.persistence.FetchType;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -135,6 +136,7 @@ public class EntityWithEagerManyToOneTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity(name = "LazyAbstractEntityReference")
|
@Entity(name = "LazyAbstractEntityReference")
|
||||||
|
@Table(name = "lazy_abstract_ent_ref")
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public static class LazyAbstractEntityReference {
|
public static class LazyAbstractEntityReference {
|
||||||
|
|
||||||
|
@ -170,6 +172,7 @@ public class EntityWithEagerManyToOneTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity(name = "LazyConcreteEntityReference")
|
@Entity(name = "LazyConcreteEntityReference")
|
||||||
|
@Table(name = "lazy_concrete_ent_ref")
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public static class LazyConcreteEntityReference {
|
public static class LazyConcreteEntityReference {
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import jakarta.persistence.FetchType;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
@DomainModel(
|
@DomainModel(
|
||||||
annotatedClasses = {
|
annotatedClasses = {
|
||||||
|
@ -137,6 +138,7 @@ public class EntityWithLazyManyToOneTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity(name = "LazyAbstractEntityReference")
|
@Entity(name = "LazyAbstractEntityReference")
|
||||||
|
@Table(name = "lazy_abstract_ent_ref")
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public static class LazyAbstractEntityReference {
|
public static class LazyAbstractEntityReference {
|
||||||
|
|
||||||
|
@ -172,6 +174,7 @@ public class EntityWithLazyManyToOneTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity(name = "LazyConcreteEntityReference")
|
@Entity(name = "LazyConcreteEntityReference")
|
||||||
|
@Table(name = "lazy_concrete_ent_ref")
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public static class LazyConcreteEntityReference {
|
public static class LazyConcreteEntityReference {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue