Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 46134 invoked from network); 28 Aug 2009 01:41:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Aug 2009 01:41:22 -0000 Received: (qmail 34775 invoked by uid 500); 28 Aug 2009 01:41:21 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 34667 invoked by uid 500); 28 Aug 2009 01:41:21 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 34585 invoked by uid 99); 28 Aug 2009 01:41:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2009 01:41:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2009 01:41:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 67931234C48D for ; Thu, 27 Aug 2009 18:40:59 -0700 (PDT) Message-ID: <107770289.1251423659423.JavaMail.jira@brutus> Date: Thu, 27 Aug 2009 18:40:59 -0700 (PDT) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-1100) @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored, but should raise an error In-Reply-To: <1662494276.1242997965549.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pinaki Poddar resolved OPENJPA-1100. ------------------------------------ Resolution: Fixed Fix Version/s: 2.0.0 2.0.0-M4 2.0.0-M3 > @Version-Annotation on Column with unsupported type (e.g. BigDecimal) is silently ignored, but should raise an error > -------------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-1100 > URL: https://issues.apache.org/jira/browse/OPENJPA-1100 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.2.1 > Environment: Windows XP, Java SDK 1.6, Websphere 6.1 + openJPA 1.2.1 > Reporter: Heiko Kopp > Assignee: Pinaki Poddar > Fix For: 2.0.0-M3, 2.0.0-M4, 2.0.0 > > > In the following example, the @Version annotated field 'version' does have a wrong type (none of the supported ones). > @Entity > @Table(name = "PARTNER", schema = "PART") > public class Partner > { > @Id > @Column(name = "PART_KEY") > private BigDecimal partKey; > @OneToMany(mappedBy = "partner", fetch = FetchType.LAZY) > private List rollen; > } > @Entity > @Table(name = "PARTNERROLLE") > public class PartnerRolle > { > @EmbeddedId > private PartnerRolleKey key; > @Version > @Column(name = "VERSION") > private BigDecimal version; > @ManyToOne(fetch = FetchType.LAZY) > @JoinColumn(name = "PART_KEY") > private Partner partner; > } > This does NOT lead to an error but silently omits the column in any query statements. The prepared statement (prepstmt) simply omitts the column. If the @Version is removed or a supported type like 'long' is used, the behaviour is correct. > Best regards, > Heiko -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.