tracker issue : CF-4204298

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

query parameter for float or decimal errors out once scale is added

| View in Tracker

Status/Resolution/Reason: To Test//Fixed

Reporter/Name(from Bugbase): Giancarlo G. / ()

Created: 05/09/2019

Components: Database, CFQuery

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.03.314033 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Problem Description:
 When the scale property is added to a query parameter it throws a java.lang.ClassCastException with the specific message of:

java.lang.Integer cannot be cast to java.lang.String

Steps to Reproduce:
 Use the following code. The first example works, the second example errors out.
{code:java}
queryExecute("SELECT :value AS value",{value:{cfsqltype:"decimal",value:2.50}});

queryExecute("SELECT :value AS value",{value:{cfsqltype:"decimal",value:2.50,scale:2}});
{code}
 

Actual Result:
 java.lang.ClassCastException on 2nd example

Expected Result:
 Query object returned

Any Workarounds:
 None

Attachments:

Comments: