You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2026/09/06 14:25:00 UTC
[jira] [Updated] (CAY-3010) LocalDateTime and friends can be accessed directly via JDBC
[ https://issues.apache.org/jira/browse/CAY-3010?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik updated CAY-3010:
---------------------------------
Description:
This is a performance optimization. Major JDBC drivers support LocalDateTime and friends directly, so there's no need for conversion between those and `java.sql` types via ValueObjectType.
Reading timestamp columns as "getObject(i, LocalDateTime.class)" vs java.sql.Timestamp -> LocalDateTime give between 5 and 20% in time savings on MySQL and PostgreSQL.
FWIW, we were already moving in this direction per CAY-2701. Now making it the default policy. Drivers that don't support "java.time" classes (SQLite, Derby) will be handled individually.
was:
This is a performance optimization. Major JDBC drivers support LocalDateTime and friends directly, so there's no need for conversion between those and `java.sql` types via ValueObjectType.
Reading timestamp columns as "getObject(i, LocalDateTime.class)" vs java.sql.Timestamp -> LocalDateTime give between 5 and 20% in time savings
> LocalDateTime and friends can be accessed directly via JDBC
> -----------------------------------------------------------
>
> Key: CAY-3010
> URL: https://issues.apache.org/jira/browse/CAY-3010
> Project: Cayenne
> Issue Type: Task
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Priority: Minor
> Fix For: 5.0-M4
>
>
> This is a performance optimization. Major JDBC drivers support LocalDateTime and friends directly, so there's no need for conversion between those and `java.sql` types via ValueObjectType.
> Reading timestamp columns as "getObject(i, LocalDateTime.class)" vs java.sql.Timestamp -> LocalDateTime give between 5 and 20% in time savings on MySQL and PostgreSQL.
> FWIW, we were already moving in this direction per CAY-2701. Now making it the default policy. Drivers that don't support "java.time" classes (SQLite, Derby) will be handled individually.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)