Skip to content

Commit f264e3c

Browse files
committed
Upgrade to Hibernate 6.2.0.Final
Closes gh-34876
1 parent 77bc552 commit f264e3c

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ bom {
333333
]
334334
}
335335
}
336-
library("Hibernate", "6.1.7.Final") {
336+
library("Hibernate", "6.2.0.Final") {
337337
group("org.hibernate.orm") {
338338
modules = [
339339
"hibernate-agroal",

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/HotelSummary.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,10 +22,4 @@ public interface HotelSummary {
2222

2323
String getName();
2424

25-
Double getAverageRating();
26-
27-
default Integer getAverageRatingRounded() {
28-
return (getAverageRating() != null) ? (int) Math.round(getAverageRating()) : null;
29-
}
30-
3125
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/service/HotelRepository.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,8 +32,7 @@ interface HotelRepository extends Repository<Hotel, Long> {
3232

3333
Hotel findByCityAndName(City city, String name);
3434

35-
@Query("select h.city as city, h.name as name, avg(r.rating) as averageRating "
36-
+ "from Hotel h left outer join h.reviews r where h.city = ?1 group by h")
35+
@Query("select h.city as city, h.name as name " + "from Hotel h where h.city = ?1 group by h")
3736
Page<HotelSummary> findByCity(City city, Pageable pageable);
3837

3938
@Query("select r.rating as rating, count(r) as count "

0 commit comments

Comments
 (0)