Hi,

I have a class Product with general informations
(idProduct, idCatalogue, and some general
informations) , two sub-classes Sub-Product1
(idSubProduct1, and specific informations) and
Sub-Product2 (idSubProduct2, and specific
informations) extends Product and a class Catalog
(1dCatalog, etc.., a vector of SubProduct1 and a
vector of SubProduct2)
My tables are
Sub-Product1(idSubProduct1,etc..,idProduct) and
SubProduct2 (idsubProduct2,etc..,idProduct).
How can i catch all the SubProduct1 and all
SubProduct2 of a catalog. with my two vectors? (i can
catch the product of a sub-product). I catch the
unique SubProduct1 with an idSubProduct1 that is the
same that idCatalog and the unique SubProduct2 with an
idSubProduct2 that is the same that idCatalog...i
dont't catch the others SubProducts of my catalog.

My mapping like this :
<mapping>
...
<class name="Catalog" identity="idCatalog">
    <map-to table="catalog"/>
    <field name="idCatalog" type="integer" ..>
      <sql name="number" type="integer"/>
    </field>
    <field name="listSubProduct1" type="SubProduct1"
.. collection="vector">
    </field>
    <field name="listSubProduct2" type="SubProduct2"
.. collection="vector">
    </field>
   </class>
  <class name="Product" identity="idProduct">
    <map-to table="product"/>
    <field name="idProduct" type="integer"..>
      <sql name="numberproduct" type="integer"/>
    </field>
   ..
    <field name="idCatalog" type="integer" ..">
      <sql name="numbercatalog"/>
    </field>
  </class>

  <class name="SubProduct1" extends="Product"
identity="idSubProduct1">
    <map-to table="subproduct1"/>
    <field name="idSubProduct1" type="integer" ..>
      <sql name="numbersubproduct1"/>
    </field>
    ..
    <field name="idProduct" type="integer" ..>
      <sql name="numberproduct" type="integer"
many-table="subproduct1" many-key="numberproduct"/>
    </field>
  </class>

  ..idem subproduct2
..
</mapping>





___________________________________________________________
Un nouveau Nokia Game commence. 
Allez sur http://fr.yahoo.com/nokiagame avant le 3 novembre
pour participer � cette aventure tous m�dias.

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

Reply via email to