Grails dirtyPropertyNames returning empty textarea that was previously empty

247 Views Asked by At

I have a domain class with a few fields. One is a String called comments who's constraints are:

comments nullable: true, maxSize:512

Comments is a text area on a GSP. In the controller method to update, a call to domain.dirtyPropertyNames returns the comments field even if it is empty and was previously empty. This only seems to happen the first time I try to update. On all other updates domain.dirtyPropertyNames does not return the comments field if it was empty before and is still empty.

Is there some reason that an empty text area field bound to a String in the domain, would be registered in the first update of a domain object as dirty if it is empty and was previously empty? The value has not changed.

0

There are 0 best solutions below