Fix failing tests on CockroachDB and Oracle 11
This commit is contained in:
parent
4b8167c7fd
commit
bc31a9532a
|
@ -21,6 +21,8 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.JoinTable;
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
|
@ -110,6 +112,7 @@ public class GenericMapAssociationTest {
|
|||
@MappedSuperclass
|
||||
public static abstract class AbstractParent<K, E> {
|
||||
@OneToMany
|
||||
@JoinTable( name = "map_join_table", joinColumns = @JoinColumn( name = "container_id" ) )
|
||||
private Map<K, E> map;
|
||||
|
||||
public AbstractParent() {
|
||||
|
|
|
@ -100,7 +100,7 @@ public class CompoundNaturalIdCacheTest {
|
|||
);
|
||||
}
|
||||
|
||||
@Entity(name = "EntityWithSimpleNaturalId")
|
||||
@Entity(name = "SimpleNaturalId")
|
||||
@NaturalIdCache
|
||||
public static class EntityWithSimpleNaturalId {
|
||||
|
||||
|
@ -128,7 +128,7 @@ public class CompoundNaturalIdCacheTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Entity(name = "EntityWithCompoundNaturalId")
|
||||
@Entity(name = "CompoundNaturalId")
|
||||
@NaturalIdCache
|
||||
public static class EntityWithCompoundNaturalId {
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import jakarta.persistence.Entity;
|
|||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.MapKeyColumn;
|
||||
|
@ -54,7 +53,7 @@ public class RefreshWithPropertyAccessAndCollectionMapManipulationInSetterMethod
|
|||
public static class Car {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@GeneratedValue
|
||||
@Access(AccessType.PROPERTY)
|
||||
private Long id;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import jakarta.persistence.Column;
|
|||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
|
@ -50,7 +49,7 @@ public class RefreshWithPropertyAccessAndListManipulationInSetterMethodTest {
|
|||
public static class Car {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@GeneratedValue
|
||||
@Access(AccessType.PROPERTY)
|
||||
private Long id;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ package org.hibernate.orm.test.query;
|
|||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import org.hibernate.dialect.CockroachDialect;
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
|
||||
import org.hibernate.testing.orm.domain.gambit.EntityOfBasics;
|
||||
|
@ -69,6 +70,7 @@ public class NamedParameterInSelectAndWhereTest {
|
|||
@Test
|
||||
@Jira( "https://hibernate.atlassian.net/browse/HHH-16305" )
|
||||
@SkipForDialect( dialectClass = PostgreSQLDialect.class, reason = "PostgreSQL doesn't support parameters as arguments for timestampdiff" )
|
||||
@SkipForDialect( dialectClass = CockroachDialect.class, reason = "CockroachDB doesn't support parameters as arguments for timestampdiff" )
|
||||
public void testSelectFunctionAndWhere(SessionFactoryScope scope) {
|
||||
scope.inTransaction( session -> assertEquals( 0, session.createQuery(
|
||||
"select timestampdiff(year, e.theLocalDate, :date) from EntityOfBasics e where e.theLocalDate <= :date",
|
||||
|
|
Loading…
Reference in New Issue