Fix booking snapshot lazy loading
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s
This commit is contained in:
@@ -43,6 +43,14 @@ interface RoomStayRepo : JpaRepository<RoomStay, UUID> {
|
||||
""")
|
||||
fun findByBookingId(@Param("bookingId") bookingId: UUID): List<RoomStay>
|
||||
|
||||
@Query("""
|
||||
select rs
|
||||
from RoomStay rs
|
||||
join fetch rs.room r
|
||||
where rs.booking.id = :bookingId
|
||||
""")
|
||||
fun findByBookingIdWithRoom(@Param("bookingId") bookingId: UUID): List<RoomStay>
|
||||
|
||||
@Query("""
|
||||
select rs
|
||||
from RoomStay rs
|
||||
|
||||
Reference in New Issue
Block a user