Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 74296 invoked from network); 22 Oct 2008 17:46:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 17:46:05 -0000 Received: (qmail 87089 invoked by uid 500); 22 Oct 2008 17:46:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 87065 invoked by uid 500); 22 Oct 2008 17:46:07 -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 87054 invoked by uid 99); 22 Oct 2008 17:46:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 10:46:07 -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, 22 Oct 2008 17:45:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 40BD8234C22A for ; Wed, 22 Oct 2008 10:45:44 -0700 (PDT) Message-ID: <347928229.1224697544250.JavaMail.jira@brutus> Date: Wed, 22 Oct 2008 10:45:44 -0700 (PDT) From: "Fernando (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-689) @ID define in super class In-Reply-To: <910618894.1218282404164.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-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641917#action_12641917 ] Fernando commented on OPENJPA-689: ---------------------------------- I am doing this right now. Did you add the EntityBase to the persistence.xml classes list? Since it has to enhance the mappedSuperclass too. > @ID define in super class > ------------------------- > > Key: OPENJPA-689 > URL: https://issues.apache.org/jira/browse/OPENJPA-689 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.1.0 > Reporter: wilesun > Fix For: 1.3.0 > > > our entities have share super class,the class has one field define the entity id,so we define the class as mappedsuperclass > when we work with hibernate JPA,it work fine. > but migrate to openjpa,the PCEnhancer don't assign other entity has ID class,so the query sql is incorrect. > example: > @MappedSuperclass > public EntityBase { > @Id > @Column(name="ID") > private String id; > } > @Entity > public B extends EntityBase { > } > @Entity > public C extends EntityBase { > } > Object o = em.find(B.class, "111"); > the sql list: > select * from A where id=? > select * from B where id=? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.