[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6662) @AssociationOverride with @JoinTable does not work

Richard Kohl (JIRA) noreply at atlassian.com
Fri Sep 16 08:42:36 EDT 2011


@AssociationOverride with @JoinTable does not work
--------------------------------------------------

                 Key: HHH-6662
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6662
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.7
         Environment: Hibernate 3.6.7.Final
            Reporter: Richard Kohl
            Priority: Critical
         Attachments: test-case.zip

@AssociationOverride is completely ignored when used with @JoinTable (test case encloded, but it will probably happen always).

I looked through the Hibernate code and that reason for that is probably the typo in org.hibernate.cfg.AbstractPropertyHolder.buildHierarchyColumnOverride(XClass), particulary lines:

currentOverride.putAll( columnOverride ); //subclasses have precedence over superclasses
currentJoinOverride.putAll( joinColumnOverride ); //subclasses have precedence over superclasses
currentJoinOverride.putAll( joinColumnOverride ); //subclasses have precedence over superclasses

Instead, the should be:

currentOverride.putAll( columnOverride ); //subclasses have precedence over superclasses
currentJoinOverride.putAll( joinColumnOverride ); //subclasses have precedence over superclasses
currentJoinTableOverride.putAll( joinTableOverride); //subclasses have precedence over superclasses

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