GH-8885: Upgrade to Hibernate 6.4.3.Final

Fixes: #8885

Looks like Hibernate does not modify provided entity instance on `merge` anymore.

* Fix JPA tests to verify that returned after merge entity has all the expected properties set
This commit is contained in:
Artem Bilan
2024-02-05 12:51:45 -05:00
parent 09897b05eb
commit 91ce70d1ad
5 changed files with 8 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ ext {
groovyVersion = '5.0.0-alpha-5'
hamcrestVersion = '2.2'
hazelcastVersion = '5.3.6'
hibernateVersion = '6.4.2.Final'
hibernateVersion = '6.4.3.Final'
hsqldbVersion = '2.7.2'
h2Version = '2.2.224'
jacksonVersion = '2.15.3'

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -207,7 +207,6 @@ public class HibernateJpaOperationsTests {
entityManager.flush();
assertThat(savedStudent).isNotNull();
assertThat(savedStudent.getRollNumber()).isNotNull();
assertThat(student.getRollNumber()).isEqualTo(savedStudent.getRollNumber());
assertThat(student != savedStudent).isTrue();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 the original author or authors.
* Copyright 2016-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -166,7 +166,6 @@ public class JpaTests {
StudentDomain mergedStudent = (StudentDomain) receive.getPayload();
assertThat(mergedStudent.getFirstName()).isEqualTo(student.getFirstName());
assertThat(mergedStudent.getRollNumber()).isNotNull();
assertThat(student.getRollNumber()).isEqualTo(mergedStudent.getRollNumber());
}
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@ public class JpaOutboundChannelAdapterTests {
List<?> results2 = this.jdbcTemplate.queryForList("Select * from Student");
assertThat(results2).hasSize(4);
assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}
@Test
@@ -134,7 +134,7 @@ public class JpaOutboundChannelAdapterTests {
List<?> results2 = this.jdbcTemplate.queryForList("Select * from Student");
assertThat(results2).hasSize(4);
assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@ public class JpaOutboundChannelAdapterTransactionalTests {
.queryForList("Select * from Student");
assertThat(results2).hasSize(4);
assertThat(testStudent.getRollNumber()).isNotNull();
assertThat(results2.get(0)).extracting("rollNumber").isNotNull();
}
}