Hi,
I am quite new to Hibernate and over the last few days I hit a road block (with Hibernate2.1.7).
I want to have an entity with a collection of values. I then want to use the Session.filter() method to retrieve a subset of that collection of values. But I can't even get the most trivial cases to work. :-(
The exception message is always:
net.sf.hibernate.QueryException: collection of values in filter: this
at net.sf.hibernate.hql.QueryTranslator.addFromAssociation(QueryTranslator.java:768)
at net.sf.hibernate.hql.FilterTranslator.compile(FilterTranslator.java:25)
at net.sf.hibernate.impl.SessionFactoryImpl.getFilter(SessionFactoryImpl.java:305)
at net.sf.hibernate.impl.SessionImpl.getFilterTranslator(SessionImpl.java:3452)
at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3509)
at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3404)
I found some posts from early 2003 on this forum regarding this topic. Filtering collections of values didn't work back than, but at that time it has been said that it should work in version 2.1.
So does Session.filter() NOT work for a collection of values in general?
If it should work, are there any examples online for filtering a collection of values?
Thanx
Volker
|