Tuesday, 12 January 2016

How to increase String column size in a ServiceBuilder generated service?

Step1:Now the issue is that Strings here are mapped to a 75 VARCHAR in the database by default, but you can change that in the portlet-model-hints.xml file by specifying a max-length hint for the given field entry. Here's an example how to increase it to 500 for instance:
1
2
3
4
5
6
<model name="my.package.model.DummyEntity">
 <field name="id" type="long"></field>
 <field name="description" type="String">
  <hint name="max-length">500</hint>
 </field>
</model>

No comments:

Post a Comment