You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br> on 2003/06/20 18:50:05 UTC

M:N little bug

Hi!

Debugging again the M:N relationships, so we can work as expected with
proxies I've found the following bug (line 815, PersistenceBrokerImpl) that
make an Item be deleted even if we set auto-delete, auto-update=false in
non-decomposible:

                if( col instanceof ManageableCollection)
                {
                    ((ManageableCollection) col).afterStore(this);
                }

it should not be (but auto-update == auto-delete)

                if( col instanceof ManageableCollection)
                {
                  if( !cds.isMtoNRelation() || ( cds.getCascadeDelete() ||
cds.getCascadeStore() ) )
                    ((ManageableCollection) col).afterStore(this);
                }

???

Or we should specify in collection descriptor explicit that this collection
is not ManageableCollection (appear that by default the collection is
RemovalAwareCollection if we don't specify anything).

Thanks,

Edson Richter



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.490 / Virus Database: 289 - Release Date: 16/6/2003

Re: M:N little bug

Posted by Thomas Mahler <th...@web.de>.
Hi Edson,

I've checked in a patch to fix CollectionProxy (and ListProxy behaviour) 
and also patches to the M:N stuff this week.

The code you refer to is no longer there (at least I didn't find it).
please check the latest version from CVS if you still think there are 
problems.

I'm now pretty confident we got everything right. I added several 
additional testcases and they all pass.

cheers,
Thomas

Edson Carlos Ericksson Richter wrote:
> Hi!
> 
> Debugging again the M:N relationships, so we can work as expected with
> proxies I've found the following bug (line 815, PersistenceBrokerImpl) that
> make an Item be deleted even if we set auto-delete, auto-update=false in
> non-decomposible:
> 
>                 if( col instanceof ManageableCollection)
>                 {
>                     ((ManageableCollection) col).afterStore(this);
>                 }
> 
> it should not be (but auto-update == auto-delete)
> 
>                 if( col instanceof ManageableCollection)
>                 {
>                   if( !cds.isMtoNRelation() || ( cds.getCascadeDelete() ||
> cds.getCascadeStore() ) )
>                     ((ManageableCollection) col).afterStore(this);
>                 }
> 
> ???
> 
> Or we should specify in collection descriptor explicit that this collection
> is not ManageableCollection (appear that by default the collection is
> RemovalAwareCollection if we don't specify anything).
> 
> Thanks,
> 
> Edson Richter
> 
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.490 / Virus Database: 289 - Release Date: 16/6/2003