db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Fernando Pollo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OJB-65) Allow field-descriptor inheritance for sub-classes
Date Tue, 09 Aug 2005 14:54:38 GMT
    [ http://issues.apache.org/jira/browse/OJB-65?page=comments#action_12318163 ] 

Luis Fernando Pollo commented on OJB-65:
----------------------------------------

We've had a discussion regarding this subject early last year, which is registered in the
mail archive and might be worth reading:

http://mail-archives.apache.org/mod_mbox/db-ojb-dev/200404.mbox/%3c20040408133331.M17279@indados.com.br%3e

It's not just about inheriting field descriptors in a derived class. It's about inheriting
*everything* from fields, to references, to collections, as you would expect in any object
oriented design. It's an *O*RM solution, after all, isn't it? It's important to balance focus
between the 'O' and the 'R' parts, otherwise you start worrying about persistence when you're
doing OO design -- and whether or not framework A or B will support what you're designing
--, which is just bad.  From my point of view, you've got to be able to define your OR mappings
in OJB in a way similar to how you define your classes in Java.

I think it's important that the current inheritance mapping mechanisms be seriously overhauled
for 1.1, since there are essencial/desirable features that are either missing or not working
propertly at the moment, most notably the incorrect handling of mappings on multiple joined
tables (see issue OJB-63) and the inheritance of mappings from base classes (see above).

Have you guys taken a look at the way hibernate handles inheritance mapping, for example,
and even considered doing something similar? I have a feeling you might be reinventing the
wheel here. They have a pretty concise way of defining inheritance there, maybe it's worth
taking a good look at.

> Allow field-descriptor inheritance for sub-classes
> --------------------------------------------------
>
>          Key: OJB-65
>          URL: http://issues.apache.org/jira/browse/OJB-65
>      Project: OJB
>         Type: Wish
>     Versions: 1.0.x CVS
>     Reporter: Armin Waibel

>
> When using "extent-classes" the field-descriptor declared in the super-classes will not
be inherited to the sub-classes. Each sub-class have to declare all fields of the super-classes.
> Think the inheritance of fields declared in super-classes could be handled by the metadata
classes when reading the repository file. When we introduce an attribute 'allowInherit' in
class-descriptor and field-descriptor element (by default it's 'true' in CLD and "undefined"
in FLD), OJB will be able to inherit copies (copies needed, because each field-descriptor
is associated with a class-descriptor) of field-descriptor instances to the sub-classes. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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