db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: [Identity] topLevelClass call really necessary?
Date Fri, 07 Mar 2003 15:55:53 GMT
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
> 
> 



Mime
View raw message