Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 70218 invoked from network); 20 Aug 2009 18:29:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Aug 2009 18:29:18 -0000 Received: (qmail 81613 invoked by uid 500); 20 Aug 2009 18:29:36 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 81547 invoked by uid 500); 20 Aug 2009 18:29:36 -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 81537 invoked by uid 99); 20 Aug 2009 18:29:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 18:29:36 +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; Thu, 20 Aug 2009 18:29:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E061A234C04B for ; Thu, 20 Aug 2009 11:29:14 -0700 (PDT) Message-ID: <1315567778.1250792954918.JavaMail.jira@brutus> Date: Thu, 20 Aug 2009 11:29:14 -0700 (PDT) From: "Fay Wang (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (OPENJPA-1256) get java.lang.ClassCastException when IdClass contains an Enum Field In-Reply-To: <1083248847.1250715916868.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-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fay Wang closed OPENJPA-1256. ----------------------------- > get java.lang.ClassCastException when IdClass contains an Enum Field > -------------------------------------------------------------------- > > Key: OPENJPA-1256 > URL: https://issues.apache.org/jira/browse/OPENJPA-1256 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.0.0 > Reporter: Fay Wang > Fix For: 2.0.0 > > > Suppose EntityA and EntityB are defined as follows: > @Entity > class EntityA { > @Id > int id; > > @OneToOne(fetch=fetchType=LAZE) > EntityB entityB; > > ... > } > @Entity > @IdClass(BId.class) > class EntityB { > @Id > int intId; > @Id > BType bType; > ... > public enum BType { A1, A2, A3, A4 }; > ... > } > ClassCast Exception is thrown in the following situation: > EntityA a = em.find(EntityA.class, 1) > EntityB b = a.getEntityB(); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.