Hmm I'm sorry but this didn't solved my Problem.
I got the following Exception
Code:
net.sf.hibernate.QueryException: collection of values in from clause: detail0_.detailValues.elements [select detail,bar from de.ivent.jdo.Detail detail, detail.detailValues bar where index(bar)= :dvname]
at net.sf.hibernate.hql.PathExpressionParser.addFromCollection(PathExpressionParser.java:420)
at net.sf.hibernate.hql.FromParser.token(FromParser.java:195)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:146)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:133)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:352)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:330)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1368)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1332)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76)
at Test.main(Test.java:61)
If I try to use this HQL :
Code:
Query q = s.createQuery("select detail,bar from de.ivent.jdo.Detail detail, detail.detailValues bar where index(bar) = :dvname");
q.setParameter(":dvname","praemierung");
(The dvParameter is my key)
Any clue ?