From: Steve E. (JIRA) <no...@at...> - 2006-06-28 05:40:59
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1552?page=all ] Steve Ebersole updated HHH-1552: -------------------------------- Component: query-hql (was: core) Priority: Blocker (was: Major) > Error when using ?1 and parameterList > ------------------------------------- > > Key: HHH-1552 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1552 > Project: Hibernate3 > Type: Bug > Components: query-hql > Versions: 3.2.0.alpha1 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Blocker > Fix For: 3.2.0 > > > select item from Item item where item.name in ( :n ) > query.setParameterList("n", list); works > select item from Item item where item.name in ( ?1 ) > query.setParameterList("1", list); > raise an exception > java.lang.NullPointerException > at org.hibernate.hql.ast.ParameterTranslationsImpl.getNamedParameterSqlLocations(ParameterTranslationsImpl.java:59) > at org.hibernate.loader.hql.QueryLoader.getNamedParameterLocs(QueryLoader.java:458) > at org.hibernate.loader.hql.QueryLoader.bindNamedParameters(QueryLoader.java:481) > at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) > at org.hibernate.loader.Loader.doQuery(Loader.java:661) > at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) > at org.hibernate.loader.Loader.doList(Loader.java:2145) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) > at org.hibernate.loader.Loader.list(Loader.java:2024) > at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) > at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333) > at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1105) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > Note that select item from Item item where item.name = ?1 > works like a charm -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |