What is the most efficient solution to get the status
attribut value from a ClassD instance by having its name
attribut value and starting from the ClassA instance?
I can use on loop in each list, but I think there is a better solution by using a create criteria
Class ClassA {
static hasMany = [CLassBList:ClassB]
}
Class ClassB {
static hasMany = [CLassCList:ClassC]
static belongsTo = [ClassA]
}
Class ClassC {
static hasMany = [CLassDList:ClassD]
static belongsTo = [ClassB]
}
Class ClassD {
String name
String status
static belongsTo = [ClassC]
}