Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SQLDataSource field of type datetime: velocity behaviour changed

    Hello, I've got a dataSource with a field of type datetime and a whereClause with a velocity substitution:
    Code:
    ....
                <field name="DATA_EVENTO" type="datetime" includeFrom="JPC_LISTINI.DATA_INIZIO"/>
    ....
                <whereClause>
                    JPC_LISTINI.DATA_INIZIO = $advancedCriteria.DATA_EVENTO
                </whereClause>
    ....
    with builds "v11.1p_2019-05-31/Enterprise Deployment" and 12.1 2019-06-03 it generates a WHERE like this:
    Code:
    JPC_LISTINI.DATA_INIZIO = TO_DATE('2019-11-27 16:41:02','YYYY-MM-DD HH24:MI:SS')
    while with "v11.1p_2019-07-11/Enterprise Deployment" and 12.1 2019-06-17 (don't know about builds in between) it generates this:
    Code:
    JPC_LISTINI.DATA_INIZIO = TO_DATE('2019-11-27','YYYY-MM-DD')
    without the time part.

    Note: in my actual use case the criteria value referred with $advancedCriteria.name is NOT actually declared as a field. Nevertheless the change in behaviour is the same.

    #2
    There were bugs fixed in this area. Specifically which one of framework settings is picked up as default format for date and datetime data types. These were mixed up under certain circumstances. Please check your framework settings sql.defaultDateFormat / sql.defaultDateTimeFormat and make sure they are set to appropriate formats. Let us know please if it helped.

    Comment


      #3
      Hello, actually I haven't got specific setting for those, just the defaults in framework.properties:

      Code:
      sql.defaultDateFormat: YYYY-MM-DD
      sql.defaultDateTimeFormat: YYYY-MM-DD HH24:MI:SS
      But I don't see a difference in those settings between those builds.

      Please note that the "new" behaviour, without the time part, is also that of the more recent builds.

      Comment


        #4
        This is fixed and will be available for download in nightly builds since Dec 2 (tomorrow).

        Comment


          #5
          I can confirm it's fixed, thank you very much

          Comment

          Working...
          X