openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (OPENJPA-322) Timezone on the Calendar object lost in proxying
Date Sat, 20 Oct 2007 00:47:50 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marc Prud'hommeaux reopened OPENJPA-322:
----------------------------------------

      Assignee: Srinivasa

I'm backing out this change, since it caused a regression in a test elsewhere.

The current documented behavior is that a Calendar field will always have set the TimeZone
that the field was initialized with. For example, if you have a class that defines:

Calendar myCalendar = Calendar.getInstance(TimeZone.getTimeZone("Europe/Budapest"));

and then you later set the field to a different TimeZone, e.g.:

myCalendar = Calendar.getInstance(TimeZone.getTimeZone("America/New_York"));

when the instance is persisted and then retrieved, the TimeZone will revert to "Europe/Budapest".
Note that this is the only way to maintain consistent behavior so long as we don't actually
persist TimeZone data (which we don't). 

Also, see section 2.1.1 of the EJB 3.0 Java Persistence API spec, which says: 'Note that an
instance of Calendar must be fully initialized for the type that it is mapped to'. That suggests
that they expect the TimeZone information in the initialized Calendar to be the one that is
used over time.

Please close this issue if you agree with the reversion; otherwise, please put in a comment
about why you think the current behavior is incorrect.

> Timezone on the Calendar object lost in proxying
> ------------------------------------------------
>
>                 Key: OPENJPA-322
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-322
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.0.0
>            Reporter: Srinivasa
>            Assignee: Srinivasa
>            Priority: Minor
>             Fix For: 1.0.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.


Mime
View raw message