openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: Quick question re date, time, timestamp or java.util.Date/Calendar
Date Wed, 04 Mar 2009 19:39:39 GMT
Hi Adam,

Looks like we're less stringent about the @Temporal annotation. I'd have to
look closer to see that's the case.

Regarding the JPA 2.0 spec you can find a copy of the public review draft
here http://jcp.org/aboutJava/communityprocess/pr/jsr317/index.html

-mike

On Wed, Mar 4, 2009 at 10:57 AM, Adam Hardy <adam.sql@cyberspaceroad.com>wrote:

>
> I converted my project over from java.util.Date to java.sql.Timestamp for
> entity fields after I figured that would give me more room to maneuver with
> a new requirement for time fields.
>
> It went smoothly with OpenJPA and made the MVC layer's type converter code
> a cinch to refactor.
>
> However I then ran my tests under Hibernate JPA and Toplink Essentials, and
> both complained bitterly that I was violating the spec and threw exceptions.
>
> Looking through the JPA 1 spec, I see where I have transgressed (9.1.20):
>
> "The Temporal annotation must be specified for persistent fields or
> properties of type java.util.Date and java.util.Calendar. It may only be
> specified for fields or properties of these types."
>
> Is the OpenJPA interpretations deliberately including Timestamp or is that
> considered an OpenJPA feature?
>
> Is there any change in JPA 2?
>
> Also, can anyone give a URL for the JPA 2 spec pdf? Google turned up
> nothing.
>
>
> Thanks
> Adam
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message