Hi all.
I noticed that a problem described in october 2002 is still present in the
0.9.9 version i just downloaded.

The reported problem is in
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.java,
lines 738 to 757 (the changes marked by LEANDRO and MBAIRD).
These two if-statements are in the wrong order, and cause proxied
collections
to be deleted (and never be rebuilt).

Would one of the maintainers be able to look in to this and make the
suggested change ?
Because I am sure that people will get bitten by this one, once they start
to
depend on the NtoM collections in combination with lazy proxies.
The suggested change is simple, understandable, and effective.

The original request up to last reaction is in the archives:
http://archives.apache.org/eyebrowse/ReadMsg?listId=107&msgNo=3362

If there is anything I can do to help please advice.

Regards,
    Theo Niemeijer



-------------------------------------------------------------------
From: Jakob Braeuchi <[EMAIL PROTECTED]>
Subject: Bug in PersistenceBrokerImpl.java
Date: Thu, 17 Oct 2002 19:34:34 +0200
Content-Type: text/plain;
        charset="iso-8859-1"

hi,

please provide a diff patch, and i'll integrate it asap.

jakob
----- Original Message -----
From: "Rudi Alberda" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 3:44 PM
Subject: Re: Bug in PersistenceBrokerImpl.java


> Well, so do I :)
>
> ----- Original Message -----
> From: "Jens Krämer" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, October 17, 2002 3:41 PM
> Subject: Re: Bug in PersistenceBrokerImpl.java
>
>
> > On Tue, Oct 15, 2002 at 11:30:59AM +0200, Rudi Alberda wrote:
> > > Hi All
> > >
> > > Some time ago I mailed some problems I had using proxy m:n collections
> in
> > > combination with other proxy m:n collection objects; Setting one
seemed
> to
> > > clear the other (which is clearly not what we want). I traced the
> problem
> > > back to what I think is a bug in PersistenceBrokerImpl.java; what
> happens is
> > > that every time an object is stored and the reference collections are
> stored
> > > as well, the entries in the indirection table are deleted and later
> added
> > > again, _except_ when the collection is proxy and not loaded yet. Which
> means
> > > the loss of reference collections. I switched the two checks which
> solves
> > > the bug for me; below is the code I switched around.
> > >
> > >    // MBAIRD
> > >    // if the collection is a collectionproxy and it's not already
loaded
> > >    // no need to store it.
> > >    if (col instanceof CollectionProxy &&
> !((CollectionProxy)col).isLoaded())
> > >    {
> > >     continue;
> > >    }
> > >
> > >         if (cds.isMtoNRelation())
> > >         {
> > >             /* LEANDRO
> > >              * Clear all MtoN implementors.
> > >              * All new MtoN implementors are going to be added bellow
> > >              */
> > >             //logger.info("STORE COLLECTIONS: deleting all MtoN
> implementors
> > > for field "+cds.getPersistentField().getName());
> > >             deleteMtoNImplementor(cds, obj);
> > >         }
> > >
> >
> >
> > I think I understand the problem and I wonder why this fix hasn't been
> > integrated into CVS yet ?
> >
> > Greetings,
> > Jens
> >
> > --
> > Jens Krämer
> > [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to