1.

How You Can Create A One-to-many Relationship In Gorm?

Answer»

you can use STATIC hasMany property at the "ONE" SIDE

CLASS User {
static hasMany = [articles: ARTICLE]
}
 
class Article {
}

you can use static hasMany property at the "one" side: 

class User {
static hasMany = [articles: Article]
}
 
class Article {
}



Discussion

No Comment Found