Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:46 Go to next message
See Khim Lee is currently offline See Khim LeeFriend
Messages: 1
Registered: October 2020
Junior Member
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 15:25 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
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 15:26]

Report message to a 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: Thu Apr 18 21:09:39 GMT 2024

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

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

Back to the top