Open jgrassel opened 2 years ago
Okay, so my test was using VARCHAR types instead of DATE/TIME/TIMESTAMP in the DDL defining the tables. Once I corrected the DDL, the function started working as expected.
That said, there does seem to be a bug with org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToLocalDateTime(Object)
, the DataTimeFormatter it gets from org.eclipse.persistence.internal.helper.Helper.getDefaultDateTimeFormatter()
includes DateTimeFormatter.ISO_LOCAL_TIME
, which expects hours/minutes/seconds separated by :
but as seen in the DB2Platform code, DB2 's native format 'YYYY-MM-DD-hh.mm.ss.SSSSSS' isn't compatible with that converter.
Is this an issue that should be addressed? Absolutely, though that is a general issue of persisting a java.time type with a VARCHAR column on DB2, and not something unique to the new function in JPA 3.1.
The fix, if available/needed, can be included in 4.0.0-RC2 if submitted
Observed the following error while running my test bucket with DB2:
Involved Code:
With Entity: