結合休眠多個值我想在遊戲框架來構建查詢,我有使用播放框架
select * from Candidate c where (:schools member of c.schools)
我綁定後:用返回結果的一個元素列表學校,但如果我綁定列表與多個元素都沒有發生。
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()]
其實我需要這樣的東西候選人與學校之間
select * from candidate where schools in (x,x,x,x,x);
關係是鏈接表。
有什麼辦法可以綁定多個值嗎?