Question : relationship in grails
Answered by : silly-sandpiper-8ny2trv4zjg8
//One-to-many
class Book { static belongsTo = Author static hasMany = [authors:Author] String title
}
//Other domain
class Author { static hasMany = [books:Book] String name
}
Source : | Last Update : Thu, 18 Feb 21