diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 3b5eea8028..1493aad9dd 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -333,7 +333,7 @@ bom { ] } } - library("Hibernate", "6.1.7.Final") { + library("Hibernate", "6.2.0.Final") { group("org.hibernate.orm") { modules = [ "hibernate-agroal", diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/HotelSummary.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/HotelSummary.java index 290119bb21..d8bfbbe233 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/HotelSummary.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/HotelSummary.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2023 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. @@ -22,10 +22,4 @@ public interface HotelSummary { String getName(); - Double getAverageRating(); - - default Integer getAverageRatingRounded() { - return (getAverageRating() != null) ? (int) Math.round(getAverageRating()) : null; - } - } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/service/HotelRepository.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/service/HotelRepository.java index b092d0fcbe..488b362f06 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/service/HotelRepository.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/service/HotelRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2023 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. @@ -32,8 +32,7 @@ interface HotelRepository extends Repository { Hotel findByCityAndName(City city, String name); - @Query("select h.city as city, h.name as name, avg(r.rating) as averageRating " - + "from Hotel h left outer join h.reviews r where h.city = ?1 group by h") + @Query("select h.city as city, h.name as name " + "from Hotel h where h.city = ?1 group by h") Page findByCity(City city, Pageable pageable); @Query("select r.rating as rating, count(r) as count "