diff --git a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java index 1a05a6e0..35c30a51 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java +++ b/docs-core/src/main/java/com/sismics/docs/core/dao/DocumentDao.java @@ -232,7 +232,8 @@ public class DocumentDao { */ public void updateFileId(Document document) { EntityManager em = ThreadLocalContext.get().getEntityManager(); - Query query = em.createNativeQuery("update T_DOCUMENT d set d.DOC_IDFILE_C = :fileId where d.DOC_ID_C = :id"); + Query query = em.createNativeQuery("update T_DOCUMENT d set d.DOC_IDFILE_C = :fileId, d.DOC_UPDATEDATE_D = :updateDate where d.DOC_ID_C = :id"); + query.setParameter("updateDate", new Date()); query.setParameter("fileId", document.getFileId()); query.setParameter("id", document.getId()); query.executeUpdate();