Hi  All ,
 
I have 2 master objects (StatusJdo and ProviderLocationJdo) and one Encounter dependent object.
 
 I have following mapping file.
 
 
    <class name="com.PCPgo.prm.web.encounter.EncounterJdo" identity="id" key-generator="SEQUENCE" >
    <description>Encounter</description>  
    <map-to table="ENCOUNTER" xml="group" />
     <field name="id" type="long" >
      <sql name="EN_ID" type="integer" />
      <xml node="element" />
    </field>
     <!--  Encounter has referance to Status Object-->
     <field name="status" type="com.PCPgo.prm.web.util.StatusJdo">
      <sql name="STA_STATUS_CODE" />
      <xml name="status" node="element" />
    </field>
     <!--  Encounter  has referance to Provider Location Object-->
     <field name="providerLoc" type="com.PCPgo.prm.web.util.ProviderLocJdo">
      <sql name="PL_LOCATION_ID" />
      <xml name="providerLoc" node="element" />
    </field>
</class >
 
Now,When I fetch record using SELECT p FROM com.PCPgo.prm.web.encounter.EncounterJdo p where p.id = $1, It returns EncounterJdo object with ProviderLocation and Status object as well.(That is what I want).
However, While creating Encounter Object using db.create(encounterJdo), It throws following errors and doesn't insert value into Encounter table of DB.

java.sql.SQLException: ORA-00957: duplicate column name

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)

at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)

at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)

at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822

 

What could be the reason for this error?

Your help will be appriciated,

 

Best regards,

Kumar

Reply via email to