db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armin Waibel" <armin.wai...@code-au-lait.de>
Subject Re: [Identity] topLevelClass call really necessary?
Date Fri, 07 Mar 2003 16:34:48 GMT
Hi Thomas,

----- Original Message -----
From: "Thomas Mahler" <thma32@web.de>
To: "OJB Developers List" <ojb-dev@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
>
>
>


Mime
View raw message