[ 
https://issues.apache.org/jira/browse/OPENJPA-1564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844558#action_12844558
 ] 

Rajeev Chaudhary edited comment on OPENJPA-1564 at 3/12/10 4:37 PM:
--------------------------------------------------------------------

I have weblogic system libraries having javax.persistence_1.0.0.0_1-0.jar and 
org.apache.openjpa_2.2.0.0_1-1-0.jar. 

Here is the persistance.xml information for the JDBC confi.
<persistence-unit name="clepDB" transaction-type="RESOURCE_LOCAL">
        
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <class>org.wadsworth.eclep.dto.FacDto</class> 
        <properties>
            <property name="openjpa.ConnectionURL" 
value="jdbc:oracle:thin:@lyra:1521:wcdev01"/>
            <property name="openjpa.ConnectionDriverName" 
value="oracle.jdbc.driver.OracleDriver"/>
            <property name="openjpa.ConnectionUserName" value="clep"/>
            <property name="openjpa.ConnectionPassword" value="clep"/>
            <property name="openjpa.jdbc.Schema" value="CLEP"/>
            <property name="openjpa.ConnectionFactoryProperties" 
value="PrettyPrint=true, PrettyPrintLineLength=80"/>
            <property name="openjpa.Log" value="SQL=TRACE" />
        </properties>
    </persistence-unit>

      was (Author: [email protected]):
    I have weblogic system libraries having javax.persistence_1.0.0.0_1-0.jar. 
Though I am not using this openjpa-1.2.2.jar. Still the properties value and 
the provider working fine. Are these also a part of 
javax.persistence_1.0.0.0_1-0.jar 

Here is the persistance.xml information for the JDBC confi.
<persistence-unit name="clepDB" transaction-type="RESOURCE_LOCAL">
        
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <class>org.wadsworth.eclep.dto.FacDto</class> 
        <properties>
            <property name="openjpa.ConnectionURL" 
value="jdbc:oracle:thin:@lyra:1521:wcdev01"/>
            <property name="openjpa.ConnectionDriverName" 
value="oracle.jdbc.driver.OracleDriver"/>
            <property name="openjpa.ConnectionUserName" value="clep"/>
            <property name="openjpa.ConnectionPassword" value="clep"/>
            <property name="openjpa.jdbc.Schema" value="CLEP"/>
            <property name="openjpa.ConnectionFactoryProperties" 
value="PrettyPrint=true, PrettyPrintLineLength=80"/>
            <property name="openjpa.Log" value="SQL=TRACE" />
        </properties>
    </persistence-unit>
  
> 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.

Reply via email to