Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Teneo] How can I persist java.util.Calendar as "timestamp with timezone"?
https://www.eclipse.org/forums/index.php/mv/msg/1065536/1691698/#msg_1691698
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
]]>Stefanie Müller2015-04-09T07:01:13-00:00Re: [Teneo] How can I persist java.util.Calendar as "timestamp with timezone"?
https://www.eclipse.org/forums/index.php/mv/msg/1065536/1691744/#msg_1691744
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
>