The Grails Framework 2.4.4

See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # isDirty ## Purpose Checks to see if a domain class instance has been modified. ## Examples

    def b = Book.get(1)
    someMethodThatMightModifyTheInstance(b)// when called without arguments returns true if any field was changed
    if (b.isDirty()) {
        // can also check if one field has changed
        if (b.isDirty('title')) {
            …
        }
    }
## Description Parameters: `fieldName` - The name of a field to check | Quick Reference (hide)