tracker issue : CF-4207855

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

[ANeff] Bug for: Default column type is OBJECT but is NULL

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Aaron N. / ()

Created: 04/06/2020

Components: Language, Query Functions

Versions: 2018

Failure Type: Conflict With Docs

Found In Build/Fixed In Build: 2018.0.08.318307 /

Priority/Frequency: Normal / Few users will encounter

Locale/System: / Windows 10 64 bit

Vote Count: 0

Issue: Default column type is OBJECT (good - per documentation and CF10 discussions) but is NULL (bad)

Repro:

Application.cfc:
-----------
component {THIS.name = "MyApp";}
-----------

index.cfm
-----------
<cfscript>
  columnNameAndTypeList = ["object","integer","bigint","double","decimal","varchar","binary","bit","time","date","timestamp"];
  myQuery = queryNew(columnNameAndTypeList.toList(), columnNameAndTypeList.toList());//Columns w/ specified types are added here
  myQuery.addColumn("default", []);//Column w/ unspecified (i.e. 'default') type is added here
  for(columnMetadata in getMetadata(myQuery)) {
	  typeName = columnMetadata.keyExists("typeName") ? columnMetadata.typeName : 'NULL';
	  writeOutput(columnMetadata.name & ' <span style="color:#typeName IS NOT 'NULL'?'green':'red'#;">[' & typeName & ']</span><br>');
  }
</cfscript>
-----------

Actual Result:

object [JAVA_OBJECT]
integer [INTEGER]
bigint [BIGINT]
double [DOUBLE]
decimal [DECIMAL]
varchar [VARCHAR]
binary [BINARY]
bit [BIT]
time [TIME]
date [DATE]
timestamp [TIMESTAMP]
default [NULL] <= "NULL" should be "JAVA_OBJECT"

Expected Result:

object [JAVA_OBJECT]
integer [INTEGER]
bigint [BIGINT]
double [DOUBLE]
decimal [DECIMAL]
varchar [VARCHAR]
binary [BINARY]
bit [BIT]
time [TIME]
date [DATE]
timestamp [TIMESTAMP]
default [JAVA_OBJECT]

Verified in CF2016 Update 1 (build 2016.0.01.298513) and CF2018 Update 8 (build 2018.0.08.318307) and later.

Attachments:

Comments:

Related URL: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-m-r/querynew.html See "Object: Java Object. This is the default column type." This was implemented in CF10 - please advise if a copy of the relevant discussions is needed. Thanks!, -Aaron
Comment by Aaron N.
33347 | April 06, 2020 06:03:35 AM GMT