Eagerly fetch room type when loading room by id
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -13,6 +13,7 @@ interface RoomRepo : JpaRepository<Room, UUID> {
|
||||
@EntityGraph(attributePaths = ["roomType"])
|
||||
fun findByPropertyIdOrderByRoomNumber(propertyId: UUID): List<Room>
|
||||
|
||||
@EntityGraph(attributePaths = ["roomType"])
|
||||
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): Room?
|
||||
|
||||
fun existsByPropertyIdAndRoomNumber(propertyId: UUID, roomNumber: Int): Boolean
|
||||
|
||||
Reference in New Issue
Block a user