Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 410 invoked from network); 12 Mar 2010 20:00:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Mar 2010 20:00:28 -0000 Received: (qmail 91024 invoked by uid 500); 12 Mar 2010 19:59:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 91003 invoked by uid 500); 12 Mar 2010 19:59:51 -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 90995 invoked by uid 99); 12 Mar 2010 19:59:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Mar 2010 19:59:51 +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, 12 Mar 2010 19:59:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7EA78234C4BE for ; Fri, 12 Mar 2010 19:59:27 +0000 (UTC) Message-ID: <1770545905.234351268423967504.JavaMail.jira@brutus.apache.org> Date: Fri, 12 Mar 2010 19:59:27 +0000 (UTC) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1564) How to Utilizing the variable define in non-entity base class, in the entity sub class. In-Reply-To: <1043721524.213241268342667230.JavaMail.jira@brutus.apache.org> 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-1564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844649#action_12844649 ] Donald Woods commented on OPENJPA-1564: --------------------------------------- Original third point - OpenJPA 1.x implements the JPA 1.0 Spec API, while OpenJPA 2.0 implements the JPA 2.0 Spec API. For OpenJPA 1.0/1.1/1.2, you can also use the JPA 1.0 Spec API jar from the Apache Geronimo project - geronimo-jpa_1.0_spec-1.1.2.jar , whereas we've already switched to the Geronimo version for 1.3/2.0. > How to Utilizing the variable define in non-entity base class, in the entity sub class. > --------------------------------------------------------------------------------------- > > Key: OPENJPA-1564 > URL: https://issues.apache.org/jira/browse/OPENJPA-1564 > Project: OpenJPA > Issue Type: Question > Reporter: Rajeev Chaudhary > Original Estimate: 24h > Remaining Estimate: 24h > > I have BaseFacDto class with defined properties. I have sub-class FacDto (entity) extending BaseFacDto. > public abstract class BaseFacDto { > @Column(name="FAC_NAME") > public String facName; > --- > } > @Entity > @Table(name="FAC") > public class FacDto extends BaseFacDto implements Serializable { > public FacDto(){} > @Id @Column(name="FAC_ID", nullable = false) > private String facId; > @Column(name="FAC_ADDRESS") > private String facAddress; > @Column(name="LABID") > } > Questions: > 1. When the query fac = clep.find(FacDto.class, facId); I don't see FAC_NAME in the logged SQL generated. Since Base class has this variable, so sub-class also get it by inheritance. Please verify. I have define it like this in base class > @Column(name="FAC_NAME") > private String facName; > 2. I also tried this thing. I created the variable in the sub-class without getter-setter. Now I see the FAC_NAME in the sql log. But the issue now is when I execute getter methods ( inherited from base class). the value is always null. > @Column(name="FAC_NAME") > private String facName; > 3. How OpenJPA different from JPA. I see that all OpenJpa sample uses the javax.persistance.jar (JPA jar). I am little confused over this. Please clarify > http://openjpa.apache.org/quick-start.html > Please help. > Thanks in advance > Rajeev -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.