Can anyone suggest the correct syntax for a where clause using in
applied to a list? The following query in an .hbm file generates a parse
exception:
<query name="Nutrient.findNutrients1">
<![CDATA[from Nutrient as nutrient where nutrient.id in elements(?)]]>
</query>
The exception follows:
PARSER.reportError(56) | line 2:95: expecting IDENT, found '?' SessionFactoryImpl.(395) | Error in named query: Nutrient.findNutrients1 org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '?' near line 2, column 95 [ from Nutrient as nutrient where nutrient.id in elements(?)