Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 49098 invoked from network); 4 Mar 2009 19:40:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 19:40:10 -0000 Received: (qmail 86714 invoked by uid 500); 4 Mar 2009 19:40:09 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 86685 invoked by uid 500); 4 Mar 2009 19:40:09 -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 86674 invoked by uid 99); 4 Mar 2009 19:40:09 -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 11:40:09 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.220.161 as permitted sender) Received: from [209.85.220.161] (HELO mail-fx0-f161.google.com) (209.85.220.161) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 19:40:01 +0000 Received: by fxm5 with SMTP id 5so2946257fxm.9 for ; Wed, 04 Mar 2009 11:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=8hrwK2h7atr+s0iShVqK3VNo1TeLldWgaUs1EBisJuw=; b=xrNBkDqIYPoHPHsOMlS/om+Cg7mve5724hO9AohFOPGNqOC89mSXyZPvDDuMWNiIDE OpTJKuEE6A4i/pSJvfZX5sdYGgDDBlPUuqZ+iOIedy8tY4XrMKa/yxwGO5QPvZGdmA5F nsjmZLJN8dC5un/I9XD8EVoJimDQsT8hmT1cU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rQTD7vv9oQLS4TRGo31DhR6+zI7KhogVHI+tsppGp997NfgeeqY239amuWk/PcM+YN nBqSVbsurWCyby6/9xi6N+IkvcWYzSpMxzpEC5jR+NiteebFSJpQeFxUxpzM171z8f36 YMB3JZWLIsTp5CBdPM+Oo2RdW6hYupburEDrY= MIME-Version: 1.0 Received: by 10.223.112.130 with SMTP id w2mr203637fap.65.1236195579654; Wed, 04 Mar 2009 11:39:39 -0800 (PST) In-Reply-To: <49AEB2F2.6010802@cyberspaceroad.com> References: <49AEB2F2.6010802@cyberspaceroad.com> Date: Wed, 4 Mar 2009 13:39:39 -0600 Message-ID: <72c1350f0903041139r2fe6d5den5c77161f8943a937@mail.gmail.com> Subject: Re: Quick question re date, time, timestamp or java.util.Date/Calendar From: Michael Dick To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=001636c5b15466f3b40464503662 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5b15466f3b40464503662 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 > --001636c5b15466f3b40464503662--