Hi,
I have debugged the OJB source code.
It's a bug in PersistenceBrokerImpl.
But I have seen that there's already a patch for it
in version 0.9.5.
So I will upgrade to the new version.
This is the patch :
// MBAIRD
// if the collection is a collectionproxy and it's not already loaded
// no need to store it.
if (col instanceof CollectionProxy && !((CollectionProxy)ol).isLoaded())
{
continue;
}
Thanks,
Frank Renaers
// MBAIRD
// if the collection is a collectionproxy and it's not already loaded
// no need to store it.
if (col instanceof CollectionProxy && !((CollectionProxy)ol).isLoaded())
{
continue;
}
-----Original Message-----
From: Frank Renaers [mailto:[EMAIL PROTECTED]]
Sent: woensdag 18 september 2002 16:27
To: 'OJB Users List'
Subject: RE: Bug in collection-proxy ??
Hi Charles,
I am not using the ODMG interface.
I am using the OJB kernel.
Cheers,
Frank
-----Original Message-----
From: Charles Anthony [mailto:[EMAIL PROTECTED]]
Sent: woensdag 18 september 2002 16:01
To: 'OJB Users List'
Subject: RE: Bug in collection-proxy ??
Hi Frank,
Are you using the ODMG interface ? If so, then this is not a bug.
Essentially, what is happening is that when you lock the parent object, the
odmg currently locks all associated objects to the transaction with a
ReadLock. This is so that you don't have to explicitly lock each object -
AKA persistency by reachability.
see
http://archives.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED]
e.org&msgId=466916
for discussions
Cheers,
Charles.
>-----Original Message-----
>From: Frank Renaers [mailto:[EMAIL PROTECTED]]
>Sent: 18 September 2002 14:58
>To: '[EMAIL PROTECTED]'
>Subject: Bug in collection-proxy ??
>
>
>Hi,
>
>One of my objects has a 1 to N relation with another child object.
>To avoid unnecessary lookups, I am using a Collection proxy.
>It works fine, BUT when the parent object is updated, the OJB kernel
>retrieves all the child objects.
>Is this a bug ? I am using OJB version 0.9.4
>
>This is the output in spy.log :
>1032355272000|0|0|statement|UPDATE CATEGORY SET CATEGORYNAME=?,
>DESCRIPTION=?, version=?, TIMESTAMP=?
>1032355272040|0|1|statement|SELECT COUNT(*) FROM ARTICLE A0 WHERE
>A0.CATEGORY_NR = ?
>1032355272070|10|1|statement|SELECT ... FROM FROM ARTICLE A0 WHERE
>A0.CATEGORY_NR = ?' ORDER BY 5
>
>Thanks,
>
>Frank
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For
>additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
This email and any attachments are strictly confidential and are intended
solely for the addressee. If you are not the intended recipient you must
not disclose, forward, copy or take any action in reliance on this message
or its attachments. If you have received this email in error please notify
the sender as soon as possible and delete it from your computer systems.
Any views or opinions presented are solely those of the author and do not
necessarily reflect those of HPD Software Limited or its affiliates.
At present the integrity of email across the internet cannot be guaranteed
and messages sent via this medium are potentially at risk. All liability
is excluded to the extent permitted by law for any claims arising as a re-
sult of the use of this medium to transmit information by or to
HPD Software Limited or its affiliates.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>