I'm using the
EnversHibernateToolTask ant task to generate a schema from my annotated classes, using the
MySQL5InnoDBDialect dialect. When it sees a construct like this:
Code:
@ManyToOne
@JoinColumn(name="FK_TO_OTHER")
private Other other;
it generates the following:
Code:
alter table This
add index FK8EA4BB54F8923F8E (FK_TO_OTHER),
add constraint FK8EA4BB54F8923F8E
foreign key (FK_TO_OTHER)
references Other (OTHER_ID);
How can I get more readable index and FK names?
How can I control whether the index gets generated?
I noticed, btw, the if I put an
@Index annotation on the field, the task generates
both indices - the one that I specified in the annotation
and the one that accompanies the FK.
TIA
Michael