Domain class constraint ‘length’ deprecated in Grails 0.4.2

The domain class constraint ‘length’ has been deprecated in Grails 0.4.2, and needs to be replaced with the equivalent constraint ‘size’ instead.

If you have upgraded to 0.4.2 you may see this error on startup:

<code>Domain class [class ExampleDomain] includes the length constraint for the exampleProperty
 property.  This constraint is deprecated and will be removed in the future.  
Please update your code to use the size constraint instead.
</code>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.