I'm trying to performa a query this way:
Code:
crit =
crit.add(
Expression.disjunction().add(
Expression.like("codigo", "%" + codigo + "%")).add(
Expression.in(
"id_proprietario",
id_prop(proprietario, session, log))));[
where id_prop(proprietario, session, log) returns a java.util.Collection of Objects (o ttype Long).
When doing the crit.list, it returns me a QueryException. I'm pretty sure the collection is returned with the right number of elements in it(I'm logging it in debug level). The first part of the query also works fine.
What did I forget?
Thanks in advance[/code]