From dev-return-8643-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Jul 16 03:55:53 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 33099 invoked from network); 16 Jul 2008 03:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jul 2008 03:55:52 -0000 Received: (qmail 92609 invoked by uid 500); 16 Jul 2008 03:55:52 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 92559 invoked by uid 500); 16 Jul 2008 03:55:52 -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 92538 invoked by uid 99); 16 Jul 2008 03:55:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 20:55:52 -0700 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; Wed, 16 Jul 2008 03:55:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A9A8C234C16A for ; Tue, 15 Jul 2008 20:55:31 -0700 (PDT) Message-ID: <1682278801.1216180531693.JavaMail.jira@brutus> Date: Tue, 15 Jul 2008 20:55:31 -0700 (PDT) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Assigned: (OPENJPA-365) Unexpected behavior on finding a Composite Key entity with a single value. In-Reply-To: <30961951.1189562312044.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pinaki Poddar reassigned OPENJPA-365: ------------------------------------- Assignee: Pinaki Poddar > Unexpected behavior on finding a Composite Key entity with a single value. > -------------------------------------------------------------------------- > > Key: OPENJPA-365 > URL: https://issues.apache.org/jira/browse/OPENJPA-365 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Environment: Windows XP, JDK 1.5, OpenJPA 0.9.7 > Reporter: Gene Wu > Assignee: Pinaki Poddar > > Entity A has a composite key AId, thus User should look up A with an instance of AId. > Example: em.find(A.class, new AId()); > In case of looking up A with a single value, for example: em.find(A.class, 12345). It will through an unexpected exception: > >>>The id type "AId" specfied by persistent type "A" does not have a public string or class + string constructor. > >>>>> org.apache.openjpa.kernel.BrokerImpl.newObjectId > >>>>> (BrokerImpl.java:1120) > >>>>> [WLServer TmsServer] at > >>>>> org.apache.openjpa.kernel.DelegatingBroker.newObjectId > >>>>> (DelegatingBroker.java:254) > >>>>> [WLServer TmsServer] at > >>>>> org.apache.openjpa.persistence.EntityManagerImpl.find > >>>>> (EntityManagerImpl.java:345) > I suppose to get an exception of error id type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.