Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 51040 invoked from network); 4 Mar 2009 16:57:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 16:57:55 -0000 Received: (qmail 19044 invoked by uid 500); 4 Mar 2009 16:57:55 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 18819 invoked by uid 500); 4 Mar 2009 16:57:55 -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 18807 invoked by uid 99); 4 Mar 2009 16:57:55 -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 08:57:55 -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 16:57:47 +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 35ED032899D for ; Wed, 4 Mar 2009 16:57:25 +0000 (GMT) Message-ID: <49AEB2F2.6010802@cyberspaceroad.com> Date: Wed, 04 Mar 2009 16:57:22 +0000 From: Adam Hardy User-Agent: Icedove 1.5.0.14eol (X11/20080724) MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Quick question re date, time, timestamp or java.util.Date/Calendar Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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