Let us consider two Grails domain example classes.
1st class:
class Person {
String name
Integer counter = 0
static transients = ['counter']
}
2nd class:
class Vehicle {
String name
transient Integer counter = 0
}
Will there be any difference in GORM persistence or domain class behaviour for the Integer counter field between classes Person and Vehicle?
EDIT: I know that Person class is the good way to do it as referenced by Grails docs. However I would prefer the Vehicle class way as it seems to be more obvious and easier not to overlook when reading a code.