Delete image tags and unlink from images
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s

This commit is contained in:
androidlover5842
2026-01-27 21:26:50 +05:30
parent c2dd4607fc
commit 0485d6a3c7
2 changed files with 7 additions and 3 deletions

View File

@@ -42,6 +42,10 @@ interface RoomImageRepo : JpaRepository<RoomImage, UUID> {
fun existsByRoomIdAndContentHash(roomId: UUID, contentHash: String): Boolean
fun existsByTagsId(id: UUID): Boolean
@org.springframework.data.jpa.repository.Modifying
@Query(value = "delete from room_image_tag_link where tag_id = :tagId", nativeQuery = true)
fun deleteTagLinks(@Param("tagId") tagId: UUID): Int
@Query("select coalesce(max(ri.roomSortOrder), 0) from RoomImage ri where ri.room.id = :roomId")
fun findMaxRoomSortOrder(@Param("roomId") roomId: UUID): Int