mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Closes #363: pgsql compatibility for table alias in update queries
This commit is contained in:
parent
ab72736bcc
commit
dff05967ea
@ -232,7 +232,7 @@ public class DocumentDao {
|
|||||||
*/
|
*/
|
||||||
public void updateFileId(Document document) {
|
public void updateFileId(Document document) {
|
||||||
EntityManager em = ThreadLocalContext.get().getEntityManager();
|
EntityManager em = ThreadLocalContext.get().getEntityManager();
|
||||||
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 query = em.createNativeQuery("update T_DOCUMENT d set DOC_IDFILE_C = :fileId, DOC_UPDATEDATE_D = :updateDate where d.DOC_ID_C = :id");
|
||||||
query.setParameter("updateDate", new Date());
|
query.setParameter("updateDate", new Date());
|
||||||
query.setParameter("fileId", document.getFileId());
|
query.setParameter("fileId", document.getFileId());
|
||||||
query.setParameter("id", document.getId());
|
query.setParameter("id", document.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user