[jira] [Commented] (TORQUE-375) Support for java.time API

"Georg Kallidis (Jira)" <[email protected]> Thu, 25 Jun 2026 10:15:00 +0000 (UTC)
Newsgroups gmane.comp.jakarta.turbine.torque.devel
Message-ID <[email protected]>
    [ https://issues.apache.org/jira/browse/TORQUE-375?page=3Dcom.atlassian=
.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1809=
1566#comment-18091566 ]=20

Georg Kallidis commented on TORQUE-375:
---------------------------------------

Schema alignment is +1 on my side.

Concerning removal of java.util.Date: Should we just, as a first step add a=
 deprecated tag, where possible and suggest / link to migration? Integratio=
ns may have still setter/getters to this old class?

I tested three patches (for default release test suite), currently getting =
these errors at the end (try to resolve ..). Thx a lot for your patches! We=
 continue to understand the changes :)

{code:java}
[ERROR] Failures:
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testJavaDefault:92 expected: <=
null> but was: <2010-09-08>
[ERROR] Errors:
[ERROR] =C2=A0 DataTest.testMultiplePk:140 =E2=94=AC=E2=95=97 Torque java.s=
ql.SQLDataException: An attempt was made to get a data value of type 'TIMES=
TAMP' from a data value of type 'java.time.LocalDateTime'.
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentDateAsDefault:275 =
=E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_DATE' could not be parsed at=
 index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentTimeAsDefault:308 =
=E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_TIME' could not be parsed at=
 index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testCurrentTimestampAsDefault:=
345 =E2=94=AC=E2=95=97 DateTimeParse Text 'CURRENT_TIMESTAMP' could not be =
parsed at index 0
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testNewObjectChangedValue:173 =
=E2=94=AC=E2=95=97 Torque java.sql.SQLDataException: An attempt was made to=
 get a data value of type 'DATE' from a data value of type 'java.time.Local=
Date'.
[ERROR] =C2=A0 DefaultValuesFromDatabaseTest.testNotNewObjectSavesUnchanged=
Values:219 =E2=94=AC=E2=95=97 Runtime org.apache.torque.TorqueException: ja=
va.sql.SQLDataException: An attempt was made to get a data value of type 'j=
ava.time.LocalDate' from a data value of type 'DATE'.
[ERROR] =C2=A0 RetrieveByPkTest.testRetrieveByNonExistingPkMultiplePKs:107 =
=E2=94=AC=E2=95=97 Torque java.sql.SQLDataException: An attempt was made to=
 get a data value of type 'TIMESTAMP' from a data value of type 'java.time.=
LocalDateTime'.{code}



> Support for java.time API
> -------------------------
>
>                 Key: TORQUE-375
>                 URL: https://issues.apache.org/jira/browse/TORQUE-375
>             Project: Torque
>          Issue Type: Improvement
>    Affects Versions: 7.1
>            Reporter: Graham Leggett
>            Priority: Major
>         Attachments: torque8-javatime1.patch, torque8-javatime2.patch, to=
rque8-javatime3.patch, torque8-javatime4.patch
>
>
> Switch out java.util.Date, replace with the java.time API.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)