Skip to main content



      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 03:01 Go to next message
Eclipse UserFriend
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 08:08 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 13:41:24 EDT 2025

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

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

Back to the top