db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oliver.m...@ppi.de
Subject RE: Identity.realClass set to abstract class?!
Date Thu, 04 Sep 2003 08:46:36 GMT

I am sorry if I am a bit pedantic on this issue,
but I fear that there is some irritation about
the meaning of Identity.realClass and 

> -----Original Message-----
> From: oliver.matz@ppi.de [mailto:oliver.matz@ppi.de]

Armin and I agreed that this is the intended meaning 
of these values:

> objectsTopLevelClass - the highest persistence-capable 
>    class or interface (in the inheritance hierarchy)
>    that the identified object is an instance of
> objectsRealClass - the concrete class of the object, 
>    or null if not known.

But in the code I often find statements like that:
(from class ReferencePrefetcher, line 104 ff)
-- snip ---
Class topLevelClass = getBroker().getTopLevelClass(
Class realClass = getObjectReferenceDescriptor().getItemClass();
// ...
id = new Identity(realClass, topLevelClass, fkValues);
-- snap ---

The class mentioned in the reference-descriptor need not
be the real class, right? So it would be better to say:

-- snip ---
Class topLevelClass = getBroker().getTopLevelClass(
// ..
id = new Identity(null, topLevelClass, fkValues);
-- snap ---

Am I right, or am I misconceiving things?

Please see also my other posting on this issue:
I could imaging to have something like that in order
not to lose the information from the reference-descriptor:


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message