Title:
Bug 82229:Using a tab instead of a space after "FROM" or "SELECT" in the HQL passed to ormExecuteQuery() causes the error "Not supported for select queries" to be thrown
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Mike Nicholls / Mike Nicholls (mikenicholls)
Created: 02/24/2010
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Minor / Unknown
Locale/System: English / Platforms All
Vote Count: 4
Duplicate ID: CF-3525456
Problem:
Using a tab instead of a space after "FROM" or "SELECT" in the HQL passed to ormExecuteQuery() causes the error "Not supported for select queries" to be thrown
Method:
index.cfm---------<!--- These work ---><cfset expensive = ormExecuteQuery("FROM ArtWHERE price > 200000")><cfset expensive = ormExecuteQuery("SELECT artnameFROM ArtWHERE price > 200000")><!--- These don't, because of the tab after "FROM" or "SELECT" ---><cfset expensive = ormExecuteQuery("FROMArtWHEREprice > 200000")><cfset expensive = ormExecuteQuery("SELECTartnameFROMArtWHEREprice > 200000")>Application.cfc---------------<cfcomponent><cfset this.name = "ORMTest"><cfset this.datasource = "cfartgallery"><cfset this.ormEnabled = true></cfcomponent>Art.cfc-------<cfcomponent persistent="true" table="Art"></cfcomponent>
Result:
Error while executing the Hibernate query.org.hibernate.hql.QueryExecutionRequestException: Not supported for select queries [FROMArtWHEREprice > 200000]at org.hibernate.hql.ast.QueryTranslatorImpl.errorIfSelect(QueryTranslatorImpl.java:301)at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:418)at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:283)at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1168)at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:117)at coldfusion.orm.hibernate.HibernatePersistenceManager._executeHQL(HibernatePersistenceManager.java:813)at coldfusion.orm.hibernate.HibernatePersistenceManager.executeHQL(HibernatePersistenceManager.java:739)at coldfusion.orm.hibernate.HibernatePersistenceManager.executeQuery(HibernatePersistenceManager.java:604)at coldfusion.orm.ORMUtils.executeQuery(ORMUtils.java:242)at coldfusion.runtime.CFPage.ORMExecuteQuery(CFPage.java:7688)at cfindex2ecfm1016205949.runPage(F:\inetpub\wwwroot\mikedev\ormTest\index.cfm:7)at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:342)at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)at coldfusion.CfmServlet.service(CfmServlet.java:200)at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)at jrun.servlet.FilterChain.service(FilterChain.java:101)at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041019
External Customer Info:
External Company:
External Customer Name: Mike Nicholls
External Customer Email: 1932664644160A2F992015D5
External Test Config: 02/24/2010
Attachments:
Comments: