I have following Model:
TestProfessional {
static hasMany = [answers: Answer]
}
Answer {
String answer;
}
How to find TestProfessional with answers having specified id?
I have following Model:
TestProfessional {
static hasMany = [answers: Answer]
}
Answer {
String answer;
}
How to find TestProfessional with answers having specified id?
That worked:
def questions = TestProfessional.withCriteria(uniqueResult: false) {
answers {
inList("id", answersIds)
}}