understanding grails relationship code example
Example: relationship in grails
//One-to-many
class Book {
static belongsTo = Author
static hasMany = [authors:Author]
String title
}
//Other domain
class Author {
static hasMany = [books:Book]
String name
}