db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: [OJB] Issue #OJB292 modified
Date Wed, 22 Sep 2004 16:28:53 GMT
Hi Ludovic,

thanks for detailed list of patches and the description of usage.

I agree with you, to make the undocumented "extends-feature" (relict of 
an attempt to support inheritance many versions ago ;-)) by setting 
'extends' attribute in class-descriptor work in some way, your patches 
are needed.

But I'm in doubt that current implementation is a good way to implement 
an official inheritance support, because we always have to (recursive) 
check for super-classes when using a class-desriptor. This will be 
possible in OJB kernel classes, but it have to be noted in top-level 
implementations and by the user too - think this is not practical.

A ClassDescriptor instance should contain all Field/ReferenceDescriptor 
of representing class. So the inherited fields should be copied from the 
super-class at startup of OJB or by the MetadataManager at runtime (in 
some way ;-)).

     if (id == null)
          refObj = null;
     } //JMM : why not see if the object has already been loaded
     else if ( pb.serviceObjectCache().lookup(id) != null )
        //LMA : Why refetch the objects ? they are already in cache!
        //refObj = pb.doGetObjectByIdentity(id);
        refObj = pb.serviceObjectCache().lookup(id);

If the user set 'refresh="true"' in class-descriptor OJB guaranteed that 
all specified fields in class-descriptor be refreshed from the DB on 
each lookup of the object. Think thats the reason why 
'pb.doGetObjectByIdentity' was used.


Ludovic Maitre (POP - Factory Part) wrote:
> Hello,
> We have made others patchs and this seems to work with heritage and 
> extends.
> We have some "exhaustive" testcases (CRUD on all types of objects on our 
> domain) but the work to separate them from the rest of our application 
> is big (we cannot do this at this time).
> The patchs are presented and availables (in a work in progress form and 
> without a lot of explanations) at :
> http://dev.factory-part.com/oss/ojb/index.html
> We can discuss them on this mailing list if somebody want.
> Ludovic
> PS: Sorry per advance for the native or fluent english readers who will 
> read the page about the patch and my other mails.
> PPS: See also : http://dev.factory-part.com/oss/ojb/index.html.fr , the 
> content-negociation is broken for the moment :-(
>> Added comment to issue 'Does the patched version work for you?
>> I ask because we don't have any test case using the 'extends' 
>> attribute and AFAIK there is no documentation about this "feature".
>> Further on I think it only makes sense to specify cla...'
> ---------------------------------------------------------------------
> 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

View raw message