modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelSQLFunctionRegister.java
changeset 34193 12232bee10ef
parent 33986 046f05dceb2d
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelSQLFunctionRegister.java	Tue Jun 12 12:08:11 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelSQLFunctionRegister.java	Wed Jun 13 17:18:35 2018 +0200
@@ -23,6 +23,7 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
+import org.hibernate.dialect.function.NoArgSQLFunction;
 import org.hibernate.dialect.function.SQLFunction;
 import org.hibernate.dialect.function.StandardSQLFunction;
 import org.hibernate.type.StandardBasicTypes;
@@ -46,7 +47,9 @@
         StandardBasicTypes.STRING));
     sqlFunctions.put("m_getjsondescription", new StandardSQLFunction("m_getjsondescription",
         StandardBasicTypes.STRING));
-    sqlFunctions.put("now", new StandardSQLFunction("now", StandardBasicTypes.DATE));
+    sqlFunctions.put("now", new NoArgSQLFunction("now", StandardBasicTypes.TIMESTAMP));
+    sqlFunctions.put("to_timestamp", new StandardSQLFunction("to_timestamp",
+        StandardBasicTypes.TIMESTAMP));
     return sqlFunctions;
   }
 }