Eagerly fetch room type aliases with rooms
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:
@@ -10,10 +10,10 @@ import java.util.UUID
|
|||||||
|
|
||||||
interface RoomRepo : JpaRepository<Room, UUID> {
|
interface RoomRepo : JpaRepository<Room, UUID> {
|
||||||
|
|
||||||
@EntityGraph(attributePaths = ["roomType"])
|
@EntityGraph(attributePaths = ["roomType", "roomType.otaAliases"])
|
||||||
fun findByPropertyIdOrderByRoomNumber(propertyId: UUID): List<Room>
|
fun findByPropertyIdOrderByRoomNumber(propertyId: UUID): List<Room>
|
||||||
|
|
||||||
@EntityGraph(attributePaths = ["roomType"])
|
@EntityGraph(attributePaths = ["roomType", "roomType.otaAliases"])
|
||||||
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): Room?
|
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): Room?
|
||||||
|
|
||||||
fun existsByPropertyIdAndRoomNumber(propertyId: UUID, roomNumber: Int): Boolean
|
fun existsByPropertyIdAndRoomNumber(propertyId: UUID, roomNumber: Int): Boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user