Relationship In Grails

[Solved] Relationship In Grails | Groovy - Code Explorer | yomemimo.com
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

Answers related to relationship in grails

Code Explorer Popular Question For Groovy