db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David.Cor...@equifax.com
Subject Re: Identity.realClass and Identity.topLevelClass
Date Thu, 28 Aug 2003 12:26:55 GMT

Did you see Dave Derry's (user) posting of 8/26 ? It suggests an improvement that
can be made to caches to so that they can cache multiple inheritance more
efficiently. No Identity changes are required.  I'm not saying this invalidates
your suggestion, just that it is "loosley related".




Hello,

Armin and I have discussed a problem (in this list)
that seems to have popped up at the Users' list, too.
("Potential Identity bug involving mulitple extents.")

I have had an idea how to improve the Identity class:
It should have three (rather than two) fields to
store the object's class:

1. realClass - the object's concrete class, i.e.,
               the result of obj.getClass() (as before)
2. lowestKnownClass - the lowest persistence-capable class
                   or interface (in the inheritance hierarchy)
                   that the identified object is known
                   to be an instance of.
3. topLevelClass - the highest persistence-capable
                   class or interface (in the inheritance hierarchy)
                   that the identified object is an instance of
                   (as before)
Suppose you have three pc class C extends B extends A,
and a reference of type B referencing an instance of class C.

When this reference is traversed, the Identity will have
realClass=null, lowesetKnownClass=B, topLevelClass=A.
Consequently, the tables for B and its subclasses (including C)
will have to be searched in, but not the table for class A.

After the object has been instantiated, the realClass will be C.

I consider this a performance improvement.

The issue with multiple inheritance remains unsolved, though.
The documentation should state clearly that there
should be a unique top-level pc class for
every connected component in the inheritance hierarchy.

What do you think?

Olli

---------------------------------------------------------------------
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