tracker issue : CF-3040986

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 82178:With ColdFusion 9 CHF 1 installed, using a column name when using query-of-queries on a query returned from entityToQuery() which has had an extra column added using queryAddColumn() throws the error

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Mike Nicholls / Mike Nicholls (mikenicholls)

Created: 02/21/2010

Components: Database, Query-of-Query(IMQ)

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 9,0,0,251028 / 272443

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

Problem:

With ColdFusion 9 CHF 1 installed, using a column name when using query-of-queries on a query returned from entityToQuery() which has had an extra column added using queryAddColumn() throws the error "Unsupported SQL type java.sql.Types.UNKNOWN".  Using query-of-queries on queries from entityToQuery()  was broken before CHF 1, and although it wasn't mentioned in the release notes CHF 1 seems to fix queries against ordinary queries straight from entityToQuery().  This issue is specific to using queryAddColumn() and then referencing a column by name ("SELECT * FROM" seems to work, "SELECT columnName FROM" does not).
Method:

index.cfm---------<cfset allArt = entityLoad("Art")><cfset artQuery = entityToQuery(allArt)><cfset newValues = ArrayNew(1)><cfloop query="artQuery"><cfset arrayAppend(newValues, "Test")></cfloop><cfset queryAddColumn(artQuery, "dodgy", "VarChar", newValues)><cfquery name="myQuery" dbtype="query">SELECT artName FROM artQuery </cfquery><cfdump var="#myQuery#">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:

Query Of Queries runtime error.Unsupported SQL type java.sql.Types.UNKNOWN.coldfusion.sql.imq.ImqUnsupportedSQLTypeException: Query Of Queries runtime error.at coldfusion.sql.imq.rttExpr.SqlToJavaMapping(rttExpr.java:848)at coldfusion.sql.imq.rttExprColumnref.validate(rttExprColumnref.java:197)at coldfusion.sql.imq.ExprColumn.validate(ExprColumn.java:153)at coldfusion.sql.imq.SelectColumnList.validate(SelectColumnList.java:173)at coldfusion.sql.imq.rttSelectExprSpec.validate(rttSelectExprSpec.java:518)at coldfusion.sql.imq.rttSelectStmt.validate(rttSelectStmt.java:84)at coldfusion.sql.imq.jdbcStatement.fetchResult(jdbcStatement.java:538)at coldfusion.sql.imq.jdbcStatement.execute(jdbcStatement.java:131)at coldfusion.sql.Executive.executeQuery(Executive.java:1239)at coldfusion.sql.SqlImpl.execute(SqlImpl.java:345)at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:843)at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:533)at cfindex2ecfm664393453.runPage(F:\inetpub\wwwroot\mikedev\qoqTest\index.cfm:6)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:	3040986

External Customer Info:
External Company:  
External Customer Name: Mike Nicholls
External Customer Email: 1932664644160A2F992015D5
External Test Config: 02/21/2010

Attachments:

Comments: