If I create a column of type string of length, say, 5000. In MySQL's export, that will create a column of type TEXT.
In order to index a TEXT field in MySQL, you must specify a length in the create statement.
Is there a way to do this in a mapping file?
Here is what I have now:
Code:
<property name="synonymList" type="java.lang.String" column="SYNONYM_LIST" length="5000" index="ix_synlist1"></property>
And the Index creation is:
Code:
create index ix_synlist1 on MYTABLE (SYNONYM_LIST);
But what I need is:
Code:
create index ix_synlist1 on MYTABLE (SYNONYM_LIST(255));
Is that possible?[/code]