Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » Java Data Type mapping for DB data type that support timezone(Mapping from Java data type to DB data type that support timezone)
Java Data Type mapping for DB data type that support timezone [message #1833851] Mon, 26 October 2020 04:46 Go to next message
Eclipse UserFriend
Hi All,

I have been searching around for way to map the corresponding java data type that support timezone to multiple targetted DB (Oracle, Postgres, SQL Server).

Though i read that java ZonedDateTime has lots of pros that improves from the previous java.util.Date, not much information could be searchable regarding the eclipselink mapping for ZonedDateTime to the database column that supports timezone information.

From this eclipselink Database support link:
https://www.eclipse.org/eclipselink/documentation/2.7/concepts/app_tl_ext001.htm

i could see the data type supported, yet no corresponding java data type is mentioned.
Would it be a table that could map the corresponding database data type to the corresponding java data type ?

Thanks,
See Khim
Re: Java Data Type mapping for DB data type that support timezone [message #1835360 is a reply to message #1833851] Tue, 01 December 2020 10:25 Go to previous message
Eclipse UserFriend
The DatabasePlatform and various subclasses define the java type -> DB column type mappings, see the buildFieldTypes method within. As far as I'm aware, there is no support for the ZonedDateTime java type.

Conversion might require additional changes though, which you might want to check out how the java.util.Calendar java type is handled on the various platforms as a template.

[Updated on: Tue, 01 December 2020 10:26] by Moderator

Previous Topic:Quoted table names in @Column(..., table = "\"Addresses\"") produces DescriptorE
Next Topic:Collection shows different data between database and cache after two inserts
Goto Forum:
  


Current Time: Fri Nov 07 08:47:05 EST 2025

Powered by FUDForum. Page generated in 0.05710 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top