Hi,
I am using hibernate for quite a sometime now. I been working on this query for past couple of days
I am using 2 "IN" clause in the where condition of query. I have oracle as backend server.
I think that this isn't allowed or what?
My query is
Query query=session.createQuery("from BasicPolicyDetails basic where basic.product.id in (:productid) and basic.agentType.id=:agentTypeid and basic.coInsurerOption=:coInsurerOption and basic.location.id in (:locationcodeid)");
It gives me error something like this.
16:42:28,700 ERROR [STDERR] net.sf.hibernate.QueryException: Named parameter doe s not appear in Query: productid0_ [from com.webify.ccpa.db.Policy.BasicPolicyDe tails basic where basic.product.id in (:productid) and basic.agentType.id=:agent Typeid and basic.coInsurerOption=:coInsurerOption and basic.location.id in (:loc ationcodeid0_, :locationcodeid1_, :locationcodeid2_)] at net.sf.hibernate.hql.QueryTranslator.getNamedParameterLocs(QueryTrans lator.java:378) at net.sf.hibernate.hql.QueryTranslator.bindNamedParameters(QueryTransla tor.java:710) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:407)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:118) at net.sf.hibernate.loader.Loader.find(Loader.java:507) at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:856) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1329) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:68) at com.webify.ccpa.db.Plan.PlanDefinitionHelper.getOverLaps(PlanDefiniti onHelper.java:629) at org.apache.jsp.$5_0005f9_0005fOverlap_0005fPlan$jsp._jspService($5_00 05f9_0005fOverlap_0005fPlan$jsp.java:127) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer vlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 81) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360 ) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati onHandler.java:280) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5 53) at org.mortbay.http.HttpContext.handle(HttpContext.java:1717) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication Context.java:549) at org.mortbay.http.HttpContext.handle(HttpContext.java:1667) at org.mortbay.http.HttpServer.service(HttpServer.java:862) at org.jboss.jetty.Jetty.service(Jetty.java:497) at org.mortbay.http.HttpConnection.service(HttpConnection.java:759) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 202) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
|