[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6754) Derived Identifiers and Inheritance not working together

Jason Pyeron (JIRA) noreply at atlassian.com
Fri Oct 21 11:38:19 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44118#comment-44118 ] 

Jason Pyeron commented on HHH-6754:
-----------------------------------

for my notes:

my posting on stackoverflow which lead me to this test/issue:

http://stackoverflow.com/questions/7836528/jpa2-joincolumns-joincolumn-name-is-not-being-respected-hibernate-3-6-and-h2

> Derived Identifiers and Inheritance not working together
> --------------------------------------------------------
>
>                 Key: HHH-6754
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6754
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.7
>            Reporter: Jason Pyeron
>         Attachments: issue.tgz
>
>
> // striped down for clarity
> @Entity
> public class Base //Works
> {
>     @Id @ManyToOne ParentA id1;
>     @Id @ManyToOne Value id2;
> }
> @Entity
> @Inheritance(strategy=InheritanceType.JOINED)
> @DiscriminatorColumn(name="dtype",discriminatorType=DiscriminatorType.STRING)
> public class Base2 //Works
> {
>     @Id @ManyToOne ParentA id1;
>     @Id @ManyToOne Value id2;
> }
> @Entity
> @Inheritance(strategy=InheritanceType.JOINED)
> @DiscriminatorColumn(name="dtype",discriminatorType=DiscriminatorType.STRING)
> public class Base3 //Fails
> {
>     @Id @ManyToOne ParentA id1;
>     @Id @ManyToOne Value id2;
> }
> @Entity
> @DiscriminatorValue("subtype")
> public class Subtype extends Base3
> {
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list