Eagerly fetch room type aliases with rooms
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s

This commit is contained in:
androidlover5842
2026-01-27 03:05:59 +05:30
parent 0104e87050
commit 40a09d1c83

View File

@@ -10,10 +10,10 @@ import java.util.UUID
interface RoomRepo : JpaRepository<Room, UUID> {
@EntityGraph(attributePaths = ["roomType"])
@EntityGraph(attributePaths = ["roomType", "roomType.otaAliases"])
fun findByPropertyIdOrderByRoomNumber(propertyId: UUID): List<Room>
@EntityGraph(attributePaths = ["roomType"])
@EntityGraph(attributePaths = ["roomType", "roomType.otaAliases"])
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): Room?
fun existsByPropertyIdAndRoomNumber(propertyId: UUID, roomNumber: Int): Boolean