I have two objects (Product and Category) mapped as 1:n asociation. I use ODMG API for 
storing my objects and enable "proxy for whole collection".
When I try to delete Catgory I suppose, that all Products in that Category should be 
deleted, BUT nothing happened: no category was deleted, no products was deleted and no 
errors was occured. 
If i I disable proxy everything fine! If I use PersistanceBroker (with proxy) instead 
ODMG everything fine too.
Whats wrong?

--------------------- repository.xml------------------
<class-descriptor class="stb.pcatalog.model.Product" table="Product">
    <field-descriptor id="1"
        name="id"
        column="ID"
        autoincrement="true"
        jdbc-type="INTEGER"
        primarykey="true"
        />
    <field-descriptor id="2"
        name="name"
        column="NAME"
        jdbc-type="VARCHAR"
        />
    <field-descriptor id="3"
        name="description"
        column="description"
        jdbc-type="VARCHAR"
        />

    <field-descriptor id="5"
        name="cat_id"
        column="cat_id"
        jdbc-type="INTEGER"
        />

    <reference-descriptor name="category"
        class-ref="stb.pcatalog.model.Category">

       <foreignkey field-id-ref="5"/>
    </reference-descriptor>

</class-descriptor>

<class-descriptor
    class="stb.pcatalog.model.Category"
    table="Category"
    >
    <field-descriptor id="1"
        name="id"
        column="ID"
        jdbc-type="INTEGER"
        autoincrement="true"
        primarykey="true"
        />
    <field-descriptor id="2"
        name="name"
        column="NAME"
        jdbc-type="VARCHAR"
        />
    <field-descriptor id="3"
        name="description"
        column="description"
        jdbc-type="VARCHAR"
        />
    <collection-descriptor
        name="products"
        element-class-ref="stb.pcatalog.model.Product"
        proxy="true"
        auto-delete="true"
        >
        <inverse-foreignkey field-id-ref="5"/>
    </collection-descriptor>
</class-descriptor>
--------------------- repository.xml------------------

Reply via email to