Hibernate allows adding indexes on @ManyToOne
mappings by the use of @org.hibernate.annotations.Index
.
Is there a way to specify index for the join table in a @ManyToMany
relation?
If Entity A
and Entity B
have a @ManyToMany
with A
being the owning side, the join table will have a composite index (a1, b1).
I wonder if this is enough, or do I need to create another index (b1, a1)?