hi,

i wonder : if i have a  class A and a class B that extends A, can i map 
class B on same table than class A? i mean with the attribute "extends"
it seems causing trouble because of the key generation, not? cos castor will 
try to insert a object A in table Table_A and then insert object B in table 
Table_B with the same pk than obj. A => that will cause duplicateKey-like 
exception since table_A and table_B are the same?
am i wrong? is there a work-around (i.e. without re-declaring all the 
attributes of the super-class)?

thx..

----------------------------------------------------------------------
<class name="estore.Client" identity="id" key-generator="keygen">
  <map-to table="client" xml="client" />
  <field name="id" type="integer" >
    <sql name="id"/>
  </field>
  <field name="nom" type="string">
    <sql name="nom" type="varchar" dirty="check" />
  </field>
</class>
----------------------------------------------------------------------
<class name="estore.ClientSub1" identity="id" extends="estore.Client">
  <map-to table="client" xml="basicProduit" />
  <field name="id" type="integer">
    <sql name="id" type="integer" />
  </field>
  <field name="nbVisites" type="integer">
    <sql name="nbv" type="varchar"/>
  </field>
</class>
----------------------------------------------------------------------

--
gilles

_________________________________________________________________
T�l�chargez MSN Explorer gratuitement � l'adresse 
http://explorer.msn.fr/intl.asp

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to