Brett Meyer commented on New Feature HHH-6473

Samuel Mendenhall, JPA's @Index usage would typically look like this:

@Entity
public class DataPoint1 {
	@Id
	@GeneratedValue
	public long id;
	
	@ManyToMany
	@JoinTable(name = "REL_FOO_BAR", indexes = @Index(name = "FOO_BAR_IDX", columnList = "FOO_FK, BAR_FK"),
		joinColumns = @JoinColumn(name = "FOO_FK"), inverseJoinColumns = @JoinColumn(name = "BAR_FK"))
	public Set<DataPoint2> dataPoint2s;
}
@Entity
public class DataPoint2 {
	@Id
	@GeneratedValue
	public long id;
	
	@ManyToMany( mappedBy="dataPoint2s" )
	public Set<DataPoint1> dataPoint1s;
}

In that case, the index is created as expected.

I noticed that org.hibernate.annotations.Index, as I'm guessing you were referring to, didn't create the index. However, that was deprecated in HHH-7969 in favor of the JPA javax.persistence.Index.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira