Fix room image ordering query
All checks were successful
build-and-deploy / build-deploy (push) Successful in 31s

This commit is contained in:
androidlover5842
2026-01-27 16:22:46 +05:30
parent 95e5d685c5
commit 6b4cac0235

View File

@@ -12,7 +12,7 @@ interface RoomImageRepo : JpaRepository<RoomImage, UUID> {
select ri
from RoomImage ri
where ri.room.id = :roomId
order by (ri.roomSortOrder is null), ri.roomSortOrder asc, ri.createdAt desc
order by case when ri.roomSortOrder is null then 1 else 0 end, ri.roomSortOrder asc, ri.createdAt desc
"""
)
fun findByRoomIdOrdered(@Param("roomId") roomId: UUID): List<RoomImage>