I'm trying to filter using an array of objects, because sometimes is many to many or one to many the kind of object that i need to filter. I'm using the flowing code :
...getSession().createQuery("from Person where addresses in ( :L0)"); qry.setParameterList("L0", (Collection)val);
the query contains an {non-qualified-property-ref} ... but the mapping appear to be ok, i dont know what kind of error im having in that code or mapping
11:00:09,625 WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: 07001 11:00:09,640 ERROR JDBCExceptionReporter:78 - No value specified for parameter 1 11:00:09,656 WARN RequestProcessor:528 - Unhandled Exception thrown: class org.hibernate.exception.SQLGrammarException 11:00:09,687 ERROR [action]:250 - Servlet.service() para servlet action lanz� excepci�n java.sql.SQLException: No value specified for parameter 1
I hope that to be posible to do in hibernate, but im not sure how to do that... if someone know, it will appreciate the help [ May 18, 2007: Message edited by: gustavo sanchez ]
the field is called by hibernate ".", and i send to hibernate in hql : "from Person act where act.addresses in (:V0)"
the traslated query, must have the pivot table (many to many).... but i dont know how to tell to hql "thats a collection of Addresses, you must use pivot table" [ May 21, 2007: Message edited by: gustavo sanchez ]