[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-249) Inheritance of annotations

Frank Zimmerli (JIRA) noreply at atlassian.com
Sat Aug 9 05:10:30 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30818 ] 

Frank Zimmerli commented on HSEARCH-249:
----------------------------------------

The problem came up when using Hibernate Search in an AndroMDA generated environment. Each persistent element has an implementation class (ElementImpl) which is inherited by a generated abstract class (Element). In the hibernate mapping you will find the ElementImpl, but the class variables, which will be indexed in Hibernate Search, can only be found in the generated abstract class. So when you do model changes Element will be overwritten, but ElementImpl will stay in place.

In that special case it would be usefull if the Hibernate Search annotations would be declard with @Inherited. I changed the Hibernate Search so far and the index files were generated.

I don't know other MDA applications (e.g. openArchitectureWare) and I don't know how they treat changes in the model compared to the already implemented things.

Maybe the @Inherited for HSearch could cause problems.

> Inheritance of annotations
> --------------------------
>
>                 Key: HSEARCH-249
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-249
>             Project: Hibernate Search
>          Issue Type: Improvement
>    Affects Versions: 3.0.1.GA
>         Environment: Hibernate 3.2.6, MySql 5.1
>            Reporter: Frank Zimmerli
>
> The SearchFactoryImpl does not handle inherited annotations. This could be usefull for abstract classes with it's concrete implementations. E.g. AndroMDA uses this mechanism for creating the interface as an abstract class and the the implementation as the hibernate object, which can be used in the services. Annotation inheritance is not part of the annotation specifiation, but there exists a extension from http://www.fusionsoft-online.com/articles-java-annotations.php to access the inherited annotations. It could be done in hibernate in the same way.

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

        



More information about the hibernate-issues mailing list