[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6473) Hibernate hbm2ddl doesn't create Indexes from @Index annotations on @ManyToMany relations

Samuel Mendenhall (JIRA) noreply at atlassian.com
Thu Jul 21 14:18:14 EDT 2011


Hibernate hbm2ddl doesn't create Indexes from @Index annotations on @ManyToMany relations
-----------------------------------------------------------------------------------------

                 Key: HHH-6473
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6473
             Project: Hibernate Core
          Issue Type: New Feature
          Components: annotations
    Affects Versions: 4.0.0.Beta4
            Reporter: Samuel Mendenhall
             Fix For: 4.x


When generating the SQL schema with Hibernate using the hbm2ddl feature the generation of indexes on ManyToMany relationships like the following is not working:
@ManyToMany()
@JoinTable(name = "REL_FOO_BAR", joinColumns = @JoinColumn(name = "FOO_FK"), inverseJoinColumns = @JoinColumn(name = "BAR_FK"))
@Index(name = "FOO_BAR_IDX")

The created SQL schema doesn't include an index named USER_ROLES_IDX. With other relation types (ManyToOne, etc.) the index is created as expected.

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