db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agsoftware.dnsalias.com>
Subject Re: [Bug?] PBImpl delete of 1:n relation when auto-delete is set true
Date Sat, 06 Dec 2003 18:38:54 GMT
Antonio Gallardo dijo:
> Hi Armin:
>
> The exposed behavior works well to me. The only diference I have is that
> in O/R mapping we don't use the "auto-retrieve" attribute at all.
>
> Best Regards,
>
> Antonio Gallardo

Sorry, I review it again:

Since we don't set auto-retrieve attribute, then it is true by default.
Note we also use auto-update="true" to get the behavior you exposed below.

I hope this would help.

Best Regards,

Antonio Gallardo

>
> Armin Waibel dijo:
>> Hi all,
>>
>> I think I found a bug? in PBImpl class on delete of the 1:n relations of
>> the main object when auto-delete is set true in metadata.
>>
>> Say we have a Product class and a Component class, Product has a 1:n
>> relation to Component and we set auto-delete in collection-descriptor.
>>
>> Product
>> {
>> id
>> name
>> components
>> }
>>
>> Component
>> {
>> id
>> name
>> productId
>> }
>>
>> 1. auto-retrieve is set true and we query a Product, then we get all
>> Components from Product and remove some components (or set components
>> 'null'). After this we delete this Product instance ---> auto-delete is
>> true, thus all found components will be deleted (without the removed)
>> BUT we should delete all components associated with this Product
>> instance.
>>
>> 2. auto-retrieve is set false. Get a Product and delete it. Since we set
>> auto-delete true we expect that all associated Components will be
>> deleted too.
>>
>> Or do I misinterpret the 'auto-delete' flag?
>>
>> regards,
>> Armin
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message