Hi,

If I have specified the following example

<class name="car">
        <field name="parts" type="part" collection="vector">
                <sql many-key="car_id"/>
        </field>
</car>
<class name="part" depends="car">
        <field name="car" type="car">
                <sql name="car_id"/>
        </field>
</class>

I cannot retrieve any 'part' object by using the database.load() method.
It is necessary to iterate over all parts of the car to compare the ids
of the parts and then return the part. If I try so, I get an exception,
that the object I'm trying to retrieve is not persistent.
I tried to remove the dependency for the 'part' object, but than I had
problems with removing parts from the list of parts for a car.

So, I have two questions:
-What happens, if I have thousands of child records, isn't it to
expensive to iterate over the list instead of getting the  
 object directly?
-How should it the code look like, if I remove the dependency, if I want
to remove a part from ist car?


Thanks a lot,

Silvio

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

Reply via email to