updateProperty
Purpose
Updates non collection, non map types only on an existing instance in the datastore. Useful when you don’t want to update the entire embedded collection or map on an instance when updating.
Examples
class Person {
..
int age
List<Integer> scores
Set<String> friends
Map<String, String> pets
}
def person = Person.get(uuid)
person.age = 31
person.updateSimpleTypes(flush:true)
Description
The regular save() method would update all the elements in an embedded collection or map even if not required. This method allows an update of only the single types on an existing instance.
Argument: * flush (optional) - When set to true flushes the persistence context, updating the datastore immediately