Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1450)

Issue 4710048: JPA : support @Temporal (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by datanucleus
Modified:
12 years, 9 months ago
Reviewers:
maxr
Base URL:
http://datanucleus-appengine.googlecode.com/svn/trunk/trunk/
Visibility:
Public.

Description

See http://code.google.com/p/datanucleus-appengine/issues/detail?id=20 This patch updates the store process to check any java.util.Date fields that are annotated with @Temporal(DATE), or @Temporal(TIME) and only persists the important part. Obviously from the user point of view there is little to see different from now (e.g if persisting as @Temporal(TIME) then the time components are still correct on retrieval as they were in GAE/J v1.x, just that before the date components would have been preserved too). Adds a test for the 3 different combinations. A logical follow on to this would be to allow persistence of java.sql.Date/Time fields; at the moment these get an exception from appengine.api.XXX saying not a supported class (even though they are really just java.util.Dates!), so we could intercept store and retrieve and present a java.util.Date to the persistence mechanism since its so picky. Then there is java.util.Calendar which could have the same treatment ...

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -1 line) Patch
src/com/google/appengine/datanucleus/TypeConversionUtils.java View 2 chunks +32 lines, -1 line 0 comments Download
tests/com/google/appengine/datanucleus/jpa/JPATemporalTest.java View 1 chunk +80 lines, -0 lines 0 comments Download
tests/com/google/appengine/datanucleus/test/TemporalHolder.java View 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 2
datanucleus
12 years, 9 months ago (2011-07-13 16:16:30 UTC) #1
maxr
12 years, 9 months ago (2011-07-15 03:46:39 UTC) #2
On 2011/07/13 16:16:30, datanucleus wrote:

LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b