title: Applying an Index to a Blob/Longtext field
body: <p>I am trying to create an index on a particular text string using Hibernate annotations. What I am currently doing is:</p>
  
  <pre><code>@Index(name="guid_index")
  @Column(length=1400)
  private String myGUID;
  </code></pre>
  
  <p>However, since the length of the column is 1400, this maps to SQL using the <code>longtext</code> type. hbm2ddl is able to create the table without mishap, but when it tries to create the index, I get:</p>
  
  <pre><code>Unsuccessful: create index guid_index on table_name (myguid);
  BLOB/TEXT column 'myguid' used in key specification without a key length
  </code></pre>
  
  <p>How can I create an index on this column using Hibernate?</p>