db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Fernando Pollo" <lpo...@indados.com.br>
Subject Contribution: inheritance of field, reference and collection descriptors
Date Wed, 07 Apr 2004 17:29:04 GMT
All,

I've patched org.apache.ojb.broker.metadata.RepositoryXmlHandler so that it 
would automatically include field, reference and collection descriptors of a 
superclass (specified via the "extends" attribute of the class descriptor) 
into a subclass' own class descriptor.

Since I've seen quite a few posts on the users list regarding this 
(apparently pending) feature, I thought it might be of use to you.

The repository handler now checks, at the end of the class-descriptor tag, 
whether the mapped class has a superclass ("extends=someClass" is present). 
If it does, the handler will include all mappings defined in the superclass 
that have NOT YET BEEN DEFINED in the subclass (this is so a subclass can 
override mappings).

The attached diff was generated from a comparison against RC6.

Hope it'll be useful.

Regards,

Luis.

________________________________

Luis Fernando Pollo
Analista de Desenvolvimento
Indados Soluções em Tecnologia
Salvador, BA


Mime
View raw message