mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '3.1.x'
Closes gh-38376
This commit is contained in:
commit
ef67838f14
@ -32,7 +32,8 @@ interface HotelRepository extends Repository<Hotel, Long> {
|
||||
|
||||
Hotel findByCityAndName(City city, String name);
|
||||
|
||||
@Query("select h.city as city, h.name as name " + "from Hotel h where h.city = ?1 group by h")
|
||||
@Query("select h.city as city, h.name as name, avg(cast(r.rating as Integer)) as averageRating "
|
||||
+ "from Hotel h left outer join h.reviews r where h.city = ?1 group by h")
|
||||
Page<HotelSummary> findByCity(City city, Pageable pageable);
|
||||
|
||||
@Query("select r.rating as rating, count(r) as count "
|
||||
|
Loading…
Reference in New Issue
Block a user