From a86af9736bd130d9ee409ec85fce346d053225f2 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Thu, 7 Feb 2019 16:55:58 +0100 Subject: [PATCH] fix test --- .../src/main/java/com/sismics/docs/core/dao/DocumentDao.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();