diff --git a/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java b/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java index 4be54c58..eb123dae 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java @@ -19,12 +19,12 @@ public class ImageItemWriter implements ItemWriter { @Override public void write(Chunk chunk) { List imageEntities = chunk.getItems(); - List videoIds = imageEntities.stream().map(ImageEntity::getId).toList(); + List imageIds = imageEntities.stream().map(ImageEntity::getId).toList(); - if (videoIds.isEmpty()) return; + if (imageIds.isEmpty()) return; - em.createQuery("DELETE FROM ImageEntity WHERE id IN (:videoIds)") - .setParameter("videoIds", videoIds) + em.createQuery("DELETE FROM ImageEntity WHERE id IN (:imageIds)") + .setParameter("imageIds", imageIds) .executeUpdate(); } }