adfemg
  1. adfemg
  2. ADFEMG-115

Groovy expression adf.currentDateTime doesn't work in MySQL database

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Labels:
      None
    • Environment:

      11.1.2.3.0

      Description

      When defaulting an EO attribute to adf.currentDateTime, ADF tries to execute SELECT SYSDATE FROM DUAL.
      This does not work in MySQL (and probably not in any other database than Oracle - I believe SYSDATE is Oracle-specific)

        Activity

        Hide
        Timo_Hahn added a comment -

        Sten, can you tell us which SQL Flavor your project uses (Oracle, SQL92...)?
        This may makes a difference.

        Show
        Timo_Hahn added a comment - Sten, can you tell us which SQL Flavor your project uses (Oracle, SQL92...)? This may makes a difference.
        Hide
        Jan Vervecken added a comment -

        hi vesterli

        • about "... adf.currentDateTime, ADF tries to execute SELECT SYSDATE FROM DUAL ..."
          • The class ExprEval [1] seems to be relevant, "Used to evaluate groovy expressions. ...".

        The source in adf_111230_6276_source.zip!\oracle\jbo\ExprEval.java contains :

        public class ExprEval implements Serializable, JboReservedVarNames
        {
        // ...
           public static final String EXPR_KEY_ADFCURRENT_DATETIME = "currentDateTime";
        // ...
                 if (EXPR_KEY_ADFCURRENT_DATETIME == key)
                 {
                    return new java.sql.Timestamp(System.currentTimeMillis());
                    // ...
                 }
        // ...
        

        Not sure if this is relevant code for the expression "adf.currentDateTime".

        • about "... This does not work in MySQL ..."
          • What behaviour do you observe, which you don't expect? Do you have a scenario that describes the steps to reproduce that behaviour?

        regards
        Jan Vervecken

        Show
        Jan Vervecken added a comment - hi vesterli about "... adf.currentDateTime, ADF tries to execute SELECT SYSDATE FROM DUAL ..." The class ExprEval [1] seems to be relevant, "Used to evaluate groovy expressions. ...". The source in adf_111230_6276_source.zip!\oracle\jbo\ExprEval.java contains : public class ExprEval implements Serializable, JboReservedVarNames { // ... public static final String EXPR_KEY_ADFCURRENT_DATETIME = "currentDateTime"; // ... if (EXPR_KEY_ADFCURRENT_DATETIME == key) { return new java.sql.Timestamp(System.currentTimeMillis()); // ... } // ... Not sure if this is relevant code for the expression "adf.currentDateTime". about "... This does not work in MySQL ..." What behaviour do you observe, which you don't expect? Do you have a scenario that describes the steps to reproduce that behaviour? [1] http://docs.oracle.com/cd/E35521_01/apirefs.111230/e17483/oracle/jbo/ExprEval.html regards Jan Vervecken
        Hide
        vesterli added a comment -

        Issue is not in adf.currentDateTime, but in selecting a column as history.
        I'll open a new issue on that. This one can be closed.

        Show
        vesterli added a comment - Issue is not in adf.currentDateTime, but in selecting a column as history. I'll open a new issue on that. This one can be closed.
        Hide
        Jan Vervecken added a comment -
        • about "I'll open a new issue on that. This one can be closed."
          • closing
        Show
        Jan Vervecken added a comment - about "I'll open a new issue on that. This one can be closed." closing

          People

          • Assignee:
            Unassigned
            Reporter:
            vesterli
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: