Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 83959 invoked from network); 4 Mar 2009 23:55:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 23:55:12 -0000 Received: (qmail 85670 invoked by uid 500); 4 Mar 2009 23:55:12 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 85653 invoked by uid 500); 4 Mar 2009 23:55:12 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 85642 invoked by uid 99); 4 Mar 2009 23:55:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 15:55:11 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [12.198.195.31] (HELO mx2.athnic.net) (12.198.195.31) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 23:54:59 +0000 Received: from [192.168.0.234] (host86-151-104-199.range86-151.btcentralplus.com [86.151.104.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx2.athnic.net (Postfix) with ESMTP id 3AF9032899D for ; Wed, 4 Mar 2009 23:54:38 +0000 (GMT) Message-ID: <49AF14B7.9060302@cyberspaceroad.com> Date: Wed, 04 Mar 2009 23:54:31 +0000 From: Adam Hardy User-Agent: Icedove 1.5.0.14eol (X11/20080724) MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Re: Quick question re date, time, timestamp or java.util.Date/Calendar References: <49AEB2F2.6010802@cyberspaceroad.com> <72c1350f0903041139r2fe6d5den5c77161f8943a937@mail.gmail.com> In-Reply-To: <72c1350f0903041139r2fe6d5den5c77161f8943a937@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks Mike. Looks like the same wording in JPA 2.0 too. Regards Adam Michael Dick on 04/03/09 19:39, wrote: > 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 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 >> >