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: