(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