eclipselink icon indicating copy to clipboard operation
eclipselink copied to clipboard

DB2 java.time support for schema generation

Open dazey3 opened this issue 2 years ago • 0 comments

Running the JSE bucket against DB2, there are some test failures using the java.time.* packages

org.eclipse.persistence.jpa.test.jpql.TestDateTimeFunctions.testIssue1539LocalDateTime
org.eclipse.persistence.jpa.test.jpql.TestDateTimeFunctions.testIssue1539LocalDate

Failure:

jakarta.persistence.PersistenceException: 
Exception [EclipseLink-3002] (Eclipse Persistence Services - 4.0.2.v202303091647): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [1970-01-01-01.11.11.000000000000], of class [class java.lang.String], from mapping [org.eclipse.persistence.mappings.DirectToFieldMapping[datetimeValue-->DATETIMEENTITY.DATETIMEVALUE]] with descriptor [RelationalDescriptor(org.eclipse.persistence.jpa.test.criteria.model.DateTimeEntity --> [DatabaseTable(DATETIMEENTITY)])], could not be converted to [class java.time.LocalDateTime].
Internal Exception: java.time.format.DateTimeParseException: Text '1970-01-01-01.11.11.000000000000' could not be parsed, unparsed text found at index 13
	at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:494)
	at org.eclipse.persistence.jpa.test.jpql.TestDateTimeFunctions.testIssue1539LocalDate(TestDateTimeFunctions.java:199)

dazey3 avatar Mar 09 '23 20:03 dazey3