Let\'s say I have a grails domain class that looks like
class Person {
Address address
}
I could also declare it as
class P
I suggest the following...
class Person {
...
static hasOne = [address: Address]
}
class Address {
...
static belongsTo = [person: Person]
}
A person has one address and the address belongs to one person.
By this way, when you delete a person, the address will be deleted too, without problems.
I think this is the better way to do this.