I am trying to create a request in the Play platform, I have
select * from Candidate c where (:schools member of c.schools)
After binding: a school with a list with one element returns a result, but if I associate a List with several elements, nothing happens.
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: {vector} [select c from models.Candidate c where (:schools0_, :schools1_ member of c.schools) group by c.id order by RAND()]
I actually need something like
select * from candidate where schools in (x,x,x,x,x);
The relationship between the candidate and the school is in a related table.
Can multiple values be related?
source
share