I have two domain classes:
class Book {
String name
static hasMany = [articles: Article]
}
class Article {
String name
static belongsTo = [book: Book]
}
I want to validate that a book does have only unique articals in terms of the article name property. In other words: there must be no article with the same name in the same book. How can I ensure that?