[hibernate-issues] [Hibernate-JIRA] Updated: (ANN-416) Mapping of inheritance with several generic superclasses fails

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Aug 25 17:40:25 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-416?page=all ]

Emmanuel Bernard updated ANN-416:
---------------------------------

    Fix Version: 3.2.0

> Mapping of inheritance with several generic superclasses fails
> --------------------------------------------------------------
>
>          Key: ANN-416
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-416
>      Project: Hibernate Annotations
>         Type: Bug

>   Components: binder
>     Versions: 3.2.0.cr1
>  Environment: Hibernate: 3.2.0.cr2
>     Reporter: Amelin Dmitry
>      Fix For: 3.2.0
>  Attachments: testcase.zip
>
>
> Classes and mapping code:
> @MappedSuperclass
> public abstract class OrganizationData<T extends OrganizationData> {
>     @OneToOne
>     private T update;
>     // Getters and Setters
>     ...
> }
> @MappedSuperclass
> public abstract class ContactData<T extends ContactData> extends OrganizationData<T> {
> }
> @Entity
> public class Phone extends ContactData<Phone> {
>     // code
>     ...
> }
> Full stack trace of any exception that occurs:
> java.lang.IllegalStateException: Property update has an unbound type and no explicit target entity.
>         at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938)
>         at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788)
>         at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:614)
>         at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353)
>         at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265)
>         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205)
> ...
> Important note:
> If Phone class inherits OrganizationData directly, all works fine.

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