diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java index a8ba1684..2f8ea730 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/FileDao.java @@ -154,14 +154,6 @@ public class FileDao { return file; } - public void updateContent(File file) { - EntityManager em = ThreadLocalContext.get().getEntityManager(); - Query query = em.createNativeQuery("update T_FILE f set FIL_CONTENT_C = :content where f.FIL_ID_C = :id"); - query.setParameter("content", file.getContent()); - query.setParameter("id", file.getId()); - query.executeUpdate(); - } - /** * Gets a file by its ID. * diff --git a/docs-core/src/main/java/com/sismics/docs/core/listener/async/FileProcessingAsyncListener.java b/docs-core/src/main/java/com/sismics/docs/core/listener/async/FileProcessingAsyncListener.java index b1c3751f..fcddddc6 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/listener/async/FileProcessingAsyncListener.java +++ b/docs-core/src/main/java/com/sismics/docs/core/listener/async/FileProcessingAsyncListener.java @@ -114,7 +114,7 @@ public class FileProcessingAsyncListener { } freshFile.setContent(content); - fileDao.updateContent(freshFile); + fileDao.update(freshFile); // Update index with the updated file if (isFileCreated) {