Upgrade to Hibernate 6.1.2.
Re-enable test cases that were previously running into HHH-15389 [0]. Filed an explicit ticket for the broken access of the sort definitions in HHH-15432 [1]. Disabled EntityGraphRepositoryMethodsIntegrationTests.shouldCreateDynamicGraphWithMultipleLevelsOfSubgraphs(…) as Hibernate now apparently behaves different for application of nested paths in fetch graphs. Likely a side effect of the fix for HHH-15391 [2]. Removed obsolete method in PartTreeJpaQueryIntegrationTests. Fixes #2615. [0] https://hibernate.atlassian.net/browse/HHH-15389 [1] https://hibernate.atlassian.net/browse/HHH-15432 [2] https://hibernate.atlassian.net/browse/HHH-15391
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -31,7 +31,7 @@
|
||||
<!-- AspectJ maven plugin can't handle 17 yet -->
|
||||
|
||||
<eclipselink>3.0.2</eclipselink>
|
||||
<hibernate>6.1.1.Final</hibernate>
|
||||
<hibernate>6.1.2.Final</hibernate>
|
||||
<jsqlparser>4.3</jsqlparser>
|
||||
<mysql-connector-java>8.0.23</mysql-connector-java>
|
||||
<postgresql>42.2.19</postgresql>
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.List;
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.Assume;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -252,6 +253,7 @@ public class EntityGraphRepositoryMethodsIntegrationTests {
|
||||
}
|
||||
|
||||
@Test // DATAJPA-1041, DATAJPA-1075
|
||||
@Disabled // likely broken due to the fixes made for HHH-15391
|
||||
void shouldCreateDynamicGraphWithMultipleLevelsOfSubgraphs() {
|
||||
|
||||
Assume.assumeTrue(currentEntityManagerIsAJpa21EntityManager(em));
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package org.springframework.data.jpa.repository;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.junit.Assume.*;
|
||||
import static org.springframework.data.domain.Sort.Direction.*;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
@@ -235,9 +234,6 @@ public class UserRepositoryFinderTests {
|
||||
@Test // DATAJPA-1519
|
||||
void escapingInLikeSpels() {
|
||||
|
||||
// HHH-15392
|
||||
assumeFalse(provider.equals(PersistenceProvider.HIBERNATE));
|
||||
|
||||
User extra = new User("extra", "Matt_ew", "extra");
|
||||
|
||||
userRepository.save(extra);
|
||||
@@ -248,9 +244,6 @@ public class UserRepositoryFinderTests {
|
||||
@Test // DATAJPA-1522
|
||||
void escapingInLikeSpelsInThePresenceOfEscapeCharacters() {
|
||||
|
||||
// HHH-15392
|
||||
assumeFalse(provider.equals(PersistenceProvider.HIBERNATE));
|
||||
|
||||
User withEscapeCharacter = userRepository.save(new User("extra", "Matt\\xew", "extra1"));
|
||||
userRepository.save(new User("extra", "Matt\\_ew", "extra2"));
|
||||
|
||||
@@ -260,9 +253,6 @@ public class UserRepositoryFinderTests {
|
||||
@Test // DATAJPA-1522
|
||||
void escapingInLikeSpelsInThePresenceOfEscapedWildcards() {
|
||||
|
||||
// HHH-15392
|
||||
assumeFalse(provider.equals(PersistenceProvider.HIBERNATE));
|
||||
|
||||
userRepository.save(new User("extra", "Matt\\xew", "extra1"));
|
||||
User withEscapedWildcard = userRepository.save(new User("extra", "Matt\\_ew", "extra2"));
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.springframework.aop.framework.Advised;
|
||||
package org.springframework.data.jpa.repository.query;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.springframework.test.util.ReflectionTestUtils.*;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
@@ -26,10 +25,8 @@ import jakarta.persistence.Query;
|
||||
import jakarta.persistence.TemporalType;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Version;
|
||||
@@ -50,7 +47,6 @@ import org.springframework.data.repository.core.support.DefaultRepositoryMetadat
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link PartTreeJpaQuery}.
|
||||
@@ -101,7 +97,7 @@ public class PartTreeJpaQueryIntegrationTests {
|
||||
}
|
||||
|
||||
@Test // DATAJPA-121
|
||||
@Disabled // HHH-15389
|
||||
@Disabled // HHH-15432
|
||||
void recreatesQueryIfNullValueIsGiven() throws Exception {
|
||||
|
||||
JpaQueryMethod queryMethod = getQueryMethod("findByFirstname", String.class, Pageable.class);
|
||||
@@ -128,7 +124,7 @@ public class PartTreeJpaQueryIntegrationTests {
|
||||
}
|
||||
|
||||
@Test // DATAJPA-920
|
||||
@Disabled // HHH-15389
|
||||
@Disabled // HHH-15432
|
||||
void shouldSelectAliasedIdForExistsProjectionQueries() throws Exception {
|
||||
|
||||
JpaQueryMethod queryMethod = getQueryMethod("existsByFirstname", String.class);
|
||||
@@ -140,7 +136,7 @@ public class PartTreeJpaQueryIntegrationTests {
|
||||
}
|
||||
|
||||
@Test // DATAJPA-1074
|
||||
@Disabled // HHH-15389
|
||||
@Disabled // HHH-15432
|
||||
void isEmptyCollection() throws Exception {
|
||||
|
||||
JpaQueryMethod queryMethod = getQueryMethod("findByRolesIsEmpty");
|
||||
@@ -152,7 +148,7 @@ public class PartTreeJpaQueryIntegrationTests {
|
||||
}
|
||||
|
||||
@Test // DATAJPA-1074
|
||||
@Disabled // HHH-15389
|
||||
@Disabled // HHH-15432
|
||||
void isNotEmptyCollection() throws Exception {
|
||||
|
||||
JpaQueryMethod queryMethod = getQueryMethod("findByRolesIsNotEmpty");
|
||||
@@ -251,22 +247,6 @@ public class PartTreeJpaQueryIntegrationTests {
|
||||
new SpelAwareProxyProjectionFactory(), PersistenceProvider.fromEntityManager(entityManager));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> T getValue(Object source, String path) {
|
||||
|
||||
Iterator<String> split = Arrays.asList(path.split("\\.")).iterator();
|
||||
Object result = source;
|
||||
|
||||
while (split.hasNext()) {
|
||||
|
||||
Assert.notNull(result, "result must not be null");
|
||||
result = getField(result, split.next());
|
||||
}
|
||||
|
||||
Assert.notNull(result, "result must not be null");
|
||||
return (T) result;
|
||||
}
|
||||
|
||||
private JpaParametersParameterAccessor getAccessor(JpaQueryMethod queryMethod, Object[] values) {
|
||||
return new JpaParametersParameterAccessor(queryMethod.getParameters(), values);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user