0

I have following Model:

TestProfessional { 
    static hasMany = [answers: Answer]
}
Answer { 
String answer;
}

How to find TestProfessional with answers having specified id?

changtung
  • 1,614
  • 15
  • 19

1 Answers1

0

That worked:

def questions = TestProfessional.withCriteria(uniqueResult: false) {
            answers {
            inList("id", answersIds)
        }}
changtung
  • 1,614
  • 15
  • 19