db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <ar...@code-au-lait.de>
Subject [Bug?] PBImpl delete of 1:n relation when auto-delete is set true
Date Sat, 06 Dec 2003 18:05:30 GMT
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


Mime
View raw message