[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-391) SecondaryTables not recognized when using JOINED inheritance

Sebastian Kirsch (JIRA) noreply at atlassian.com
Thu Jun 28 09:01:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27334 ] 

Sebastian Kirsch commented on ANN-391:
--------------------------------------

Hi Andreas!

Not sure if it is applicable for your situation; but maybe this helps:
I switched to single-table inheritance (with a discriminator column), defining all properties introduced by the extended classes as located in a secondary table. Although it seems odd - for the single-table inheritance, using secondary tables actually works. You can even define a "subsub"class with another "secondary" table.
The result is pretty much the same (even in SQL I guess) like using joined inheritance.
Defining two secondary tables in one class should not cause any trouble (which would probably solve your issue).

> SecondaryTables not recognized when using JOINED inheritance
> ------------------------------------------------------------
>
>                 Key: ANN-391
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-391
>             Project: Hibernate Annotations
>          Issue Type: Bug
>    Affects Versions: 3.1.0.Beta10, 3.2.0.cr1
>         Environment: Hibernate 3.2.0CR1; db is irrelevant, as the buildSessionFactory() fails.
>            Reporter: Sebastian Kirsch
>         Attachments: TestSecondaries.java, TestSecondaries.java
>
>
> The Configuration doesn't recognize secondary tables of a super class.
> Calling AnnotationConfiguration.buildSessionFactory fails, claiming that the secondary table used in the super class cannot be found in the subclass.
> Adding the secondary table to the subclass doesn't help either.
> See attached JUnit test case.

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