When generating the SQL schema with Hibernate using the hbm2ddl feature the generation of indexes on ManyToMany relationships like the following is not working:
@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.