title: How to get a Text type instead of String type in liferay service
body: <p>Say you have this kind of entity in your service.xml</p>
  
  <pre><code>&lt;entity name="Answer" local-service="true" remote-service="true"&gt;
      &lt;!-- PK fields --&gt;
      &lt;column name="answer_id" type="long" primary="true" /&gt;
      &lt;!-- Other fields --&gt;
      &lt;column name="user_id" type="long" /&gt;
      &lt;column name="answer" type="String" /&gt;
      &lt;column name="date_answered" type="Date" /&gt;
  &lt;/entity&gt;
  </code></pre>
  
  <p>My understanding, looking at posts like <a href="https://www.dnebinger.com/wiki/-/wiki/Portal+Development/Creating+the+Liferay+Service" rel="nofollow">this</a> and <a href="http://www.liferay.com/web/jonas.yuan/blog/-/blogs/applying-convert-null-attribute-in-service-builder-to-persist-null-and-not-null-into-data-types-in-databases" rel="nofollow">this</a>, is that using the Liferay 6 Service Builder, you can only specify a type String but not Text. If you want to use a Text type, you have to modify the generated SQL script by hand. It seems that you can also edit the portlet-model-hints.xml file, like so</p>
  
  <pre><code>&lt;field name="answer" type="String"&gt;
      &lt;hint name="max-length"&gt;5000&lt;/hint&gt;
  &lt;/field&gt;
  </code></pre>
  
  <p>in which case the field type will be set to "TEXT" in the generated SQL file.</p>
  
  <p>But what if you need to update the "answer" field from a string to a text field, the tables having already be generated following the first schema ?</p>
  
  <p>Thank you for your answers</p>