Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1217

Auditing handler logic no longer supports java.time.OffsetDateTime?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.0.1 (Kay SR1)
    • Fix Version/s: None
    • Component/s: Mapping / Conversion
    • Labels:
      None

      Description

      We use many entity types that contain:

      @CreatedDate
      private OffsetDateTime created;
      

      This works fine with spring-data 1.x but is no longer supported in spring-data-2.x ("Invalid date type for member ..."). After some debugging, it seems to me that it's because the method DateConvertingAuditableBeanWrapper.getDateValueToSet() no longer attempts the conversion from java.util.Calendar to the target type (for which there is a built-in converter in DateTimeConverters).

      Is this a deliberate change, or an oversight? If the former, what is the recommended way to add support for java.util.OffsetDateTime in the audited fields?

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            vtoman Vojtech Toman
            Last updater:
            Vojtech Toman
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: