Hi ,

      I have the following mapping.xml :

<mapping>

  <!--  Mapping for TradingAccount -->
  <class name="TradingAccountValue"
         identity="userRef">
    <description>Trading Account</description>
    <map-to table="TradingAccount" xml="Trading Account" />
    <field name="userRef" type="long" >
      <sql name="userRef" />
    </field>
    <field name="brokerID" >
      <sql name="brokerId" />
    </field>
    <field name="accountNo">
      <sql name="accountNo" />
    </field>   
    <field name="activate" type="boolean" >
      <sql name="activate" />
    &l! t;/field>   
  </class>
  <!--  Mapping for PersonProfile  -->
  <class name="PersonProfileValue"
         identity="userRef">
    <description>Person Profile</description>
    <map-to table="PersonProfile" xml="personProfile" />
    <field name="userRef" type="long" >
      <sql name="personId" />
    </field>
    <field name="identityNumber" >
      <sql name="identityNo" />
    </field>
    <field name="tradingAccount" type="TradingAccountValue">
      <sql name="personId" />
    </field>   
  </class>
</mapping>

When I try to create the PersonProfileValue, it give the following exception :

[test] org.exolab.castor.jdo.PersistenceException: Nested error: java.sql.SQLExc
eption: ORA-00957: duplicate column name

[test] java.sql.SQLException: ORA-00957: duplicate column name

The duplicate column name is due to the personId, I the personId for  PersonProfileValue and TradingAccountValue. When I use the select query and the remove they works fine except for creation. Hope that somebody can help me regarding this problem. Thanks.

Regards

Terry

 

 



 



Get your FREE download of MSN Explorer at http://explorer.msn.com
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev

Reply via email to