RED-6501: Corrected manual-redaction deletion.
Removed manual delete-query implementation because it was redundant and also contained an incorrect destination entity.
This commit is contained in:
parent
b41aa58e54
commit
ffc4e9bd0e
@ -91,7 +91,7 @@ public class AddRedactionPersistenceService {
|
||||
@Transactional
|
||||
public void hardDelete(String fileId, String annotationId) {
|
||||
|
||||
manualRedactionRepository.hardDelete(new AnnotationEntityId(annotationId, fileId));
|
||||
manualRedactionRepository.deleteById(new AnnotationEntityId(annotationId, fileId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -8,20 +8,13 @@ import java.util.Set;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.iqser.red.service.persistence.management.v1.processor.entity.annotations.AnnotationEntityId;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.entity.annotations.ManualRedactionEntryEntity;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.AnnotationStatus;
|
||||
|
||||
public interface ManualRedactionRepository extends JpaRepository<ManualRedactionEntryEntity, AnnotationEntityId> {
|
||||
|
||||
@Transactional
|
||||
@Modifying(flushAutomatically = true, clearAutomatically = true)
|
||||
@Query("delete from ManualForceRedactionEntity e where e.id = :id")
|
||||
void hardDelete(AnnotationEntityId id);
|
||||
|
||||
|
||||
|
||||
@Modifying
|
||||
@Query("update ManualRedactionEntryEntity m set m.softDeletedTime = :softDeleteTime where m.id = :id")
|
||||
void updateSoftDelete(AnnotationEntityId id, OffsetDateTime softDeleteTime);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user