openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <>
Subject [jira] Commented: (OPENJPA-322) Timezone on the Calendar object lost in proxying
Date Thu, 31 Jan 2008 18:59:09 GMT


Craig Russell commented on OPENJPA-322:

The JPA specification is a bit terse on the requirements, but does say that an @Temporal annotation
is required for a persistent field or property of type Calendar, and that 'Note that an instance
of Calendar must be fully initialized for the type that it is mapped to'. There are only three
database types that the field can be mapped to: 
public enum TemporalType { 
DATE, //java.sql.Date 
TIME, //java.sql.Time 
TIMESTAMP //java.sql.Timestamp 

None of these database types have any storage mechanism for the time zone of the Calendar,
and therefore there is no way to construct a Calendar with the time zone of the original Calendar.

Until the specification is changed to allow for storage of the time zone using proprietary
database APIs, the only thing I think we can do is to instantiate a Calendar using the default
time zone of the caller at the time the field is fetched from the database.

> Timezone on the Calendar object lost in proxying
> ------------------------------------------------
>                 Key: OPENJPA-322
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.0.0
>            Reporter: Srinivasa
>            Assignee: Srinivasa
>            Priority: Minor
>             Fix For: 1.0.0, 1.0.2, 1.1.0
> For the Calendar type when the proxy is created the Timezone information is lost.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message