Skip to content

Commit 4fbfb84

Browse files
committed
Feat: AttachmentMappingRepository 메서드 추가
- deleteAllByEntityTypeAndEntityId (EntityType과 EnityId에 해당하는 파일 매핑 정보 모두 삭제)
1 parent 427f21d commit 4fbfb84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/back/domain/file/repository/AttachmentMappingRepository.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
import com.back.domain.file.entity.EntityType;
55
import org.springframework.data.jpa.repository.JpaRepository;
66

7+
import java.util.List;
78
import java.util.Optional;
89

910
public interface AttachmentMappingRepository extends JpaRepository<AttachmentMapping, Long> {
10-
Optional<AttachmentMapping> findByEntityTypeAndEntityId(EntityType entityType, Long entityID);
11-
}
11+
List<AttachmentMapping> findByEntityTypeAndEntityId(EntityType entityType, Long entityID);
12+
13+
void deleteAllByEntityTypeAndEntityId(EntityType entityType, Long entityId);
14+
}

0 commit comments

Comments
 (0)