Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 29134 invoked from network); 6 May 2009 00:14:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 May 2009 00:14:53 -0000 Received: (qmail 9926 invoked by uid 500); 6 May 2009 00:14:52 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 9782 invoked by uid 500); 6 May 2009 00:14: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 9772 invoked by uid 99); 6 May 2009 00:14:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 00:14:52 +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; Wed, 06 May 2009 00:14:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 71850234C044 for ; Tue, 5 May 2009 17:14:30 -0700 (PDT) Message-ID: <393321026.1241568870464.JavaMail.jira@brutus> Date: Tue, 5 May 2009 17:14:30 -0700 (PDT) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1061) Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter In-Reply-To: <1239673166.1241548110479.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-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706264#action_12706264 ] Pinaki Poddar commented on OPENJPA-1061: ---------------------------------------- I have added a new method ClassMetaData.isAbstract() which affirms (in JPA context) for MappedSuperclass. This method may help to identify whether a type is MSC. > Entities extending from a Mapped Superclass that defines the ID fields share the same ObjectID type parameter > ------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-1061 > URL: https://issues.apache.org/jira/browse/OPENJPA-1061 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 1.2.0, 1.2.1 > Reporter: Jody Grassel > Assignee: Jody Grassel > Attachments: PCEnhancer.patch, unitttest.patch > > > When a mapped superclass (MSC) defines @Id fields, it appears that entities extending the MSC use the MSC's type in the generated ObjectID's type field. This can result in unexpected primary key collissions between entities that are not intended to be related in an entity inheritance hierarchy. Attached to the JIRA is a junit test case that demonstrates the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.