Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] How can I persist java.util.Calendar as "timestamp with timezone"?
[Teneo] How can I persist java.util.Calendar as "timestamp with timezone"? [message #1691698] Thu, 09 April 2015 07:01 Go to next message
Stefanie Müller is currently offline Stefanie MüllerFriend
Messages: 7
Registered: November 2014
Junior Member
Hi everybody,

I've modeled an entity which has an attribute of type java.util.Calendar, which I want to persist in a postgreSQL database. Teneo generates the database column for that as "timestamp without timezone". To prevent loosing timezone information, I would like to persist it as "timestamp with timezone". Does somebody know, how this can be achieved?

Thanks in advance!
Steffi
Re: [Teneo] How can I persist java.util.Calendar as "timestamp with timezone"? [message #1691744 is a reply to message #1691698] Thu, 09 April 2015 12:08 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Stefanie,
The best in this case is to use a @Column annotation, here is described how to do annotations:
https://wiki.eclipse.org/Teneo/Hibernate#Model_Relational_Mapping_with_EJB3.2FJPA_Annotations

Annotations can also be done on an EDataType so then they are re-used by all the eattributes using the edatatype.

gr. Martin

On 09-04-15 09:01, Stefanie Müller wrote:
> Hi everybody,
>
> I've modeled an entity which has an attribute of type java.util.Calendar, which I want to persist in a postgreSQL
> database. Teneo generates the database column for that as "timestamp without timezone". To prevent loosing timezone
> information, I would like to persist it as "timestamp with timezone". Does somebody know, how this can be achieved?
>
> Thanks in advance!
> Steffi
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[Texo] DAO configuration and JSON customization
Next Topic:[ECF] Pbs with EMF Client Platform and tree-explorer (Eclipse e4)
Goto Forum:
  


Current Time: Fri Sep 18 11:12:57 GMT 2020

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

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

Back to the top