You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Armin Waibel <ar...@code-au-lait.de> on 2003/03/07 10:32:29 UTC

[Identity] topLevelClass call really necessary?

Hi all,

after reading a post ("Bug in PersistenceBrokerImpl"
by Hubert) on the user-list I started thinking about
that (yes, I'm capable of doing this ;-)).

The question is do we really need the topLevelClass
in the Identity object to be extent aware?
I don't think so, because the pk of the object should
be extent aware, thus it's not necessary to use the
topLevelClass as objectClass in Identity.

I remove the topLevel method call in
PB#getReferencedObject(..) and in Identity.
All tests pass well and PB-api does perform
better.

Do I overlooked something?
What do you think?

regards,
Armin



Re: [Identity] topLevelClass call really necessary?

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Thomas,

----- Original Message -----
From: "Thomas Mahler" <th...@web.de>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Friday, March 07, 2003 4:55 PM
Subject: Re: [Identity] topLevelClass call really necessary?


> Hi ARmin,
>
> There was a reason for this design.
> Say there is an abstract class A and a concrete class B extending A.
> No say there is a B instance b with a primary key value '17'.
>
> If we do not use the toplevel extent to define Identies it could
happen
> that OJB addresses this object as A{17} or as B{17}.
I don't understand this, because A is an abstract class. When
does OJB create Identity objects using abstract class A.


> this result would violate base rules like
> if x == y then id(x) == id(y)
>
> We detected this issue a long time ago An I thaugt there was a
testcase
> covering it...

If there is a test case it was passed without failures!

regards,
Armin
>
> cheers,
> Thomas
>
> Armin Waibel wrote:
> > Hi all,
> >
> > after reading a post ("Bug in PersistenceBrokerImpl"
> > by Hubert) on the user-list I started thinking about
> > that (yes, I'm capable of doing this ;-)).
> >
> > The question is do we really need the topLevelClass
> > in the Identity object to be extent aware?
> > I don't think so, because the pk of the object should
> > be extent aware, thus it's not necessary to use the
> > topLevelClass as objectClass in Identity.
> >
> > I remove the topLevel method call in
> > PB#getReferencedObject(..) and in Identity.
> > All tests pass well and PB-api does perform
> > better.
> >
> > Do I overlooked something?
> > What do you think?
> >
> > 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
>
>
>


Re: [Identity] topLevelClass call really necessary?

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

There was a reason for this design.
Say there is an abstract class A and a concrete class B extending A.
No say there is a B instance b with a primary key value '17'.

If we do not use the toplevel extent to define Identies it could happen 
that OJB addresses this object as A{17} or as B{17}.
this result would violate base rules like
if x == y then id(x) == id(y)

We detected this issue a long time ago An I thaugt there was a testcase 
covering it...

cheers,
Thomas

Armin Waibel wrote:
> Hi all,
> 
> after reading a post ("Bug in PersistenceBrokerImpl"
> by Hubert) on the user-list I started thinking about
> that (yes, I'm capable of doing this ;-)).
> 
> The question is do we really need the topLevelClass
> in the Identity object to be extent aware?
> I don't think so, because the pk of the object should
> be extent aware, thus it's not necessary to use the
> topLevelClass as objectClass in Identity.
> 
> I remove the topLevel method call in
> PB#getReferencedObject(..) and in Identity.
> All tests pass well and PB-api does perform
> better.
> 
> Do I overlooked something?
> What do you think?
> 
> regards,
> Armin
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
>