Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): mark landmann / mark landmann (mark landmann)
Created: 05/02/2016
Components: Core Runtime
Versions: 2016
Failure Type: Data Loss
Found In Build/Fixed In Build: CF2016_Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Windows 10 64 bit
Vote Count: 0
Duplicate ID: CF-4122530
Problem Description:
Using a duplicate on Query return results in an empty query being returned.
Steps to Reproduce:
Create a CFC with a method, such as:
<cffunction name="Pick" access="public" output="true" returntype="Query" DisplayName="Pick AccountType">
<cfargument Name="SortBy" Type="String" Required="No" Hint="SortBy" Default="SortPosition">
<cfset var qPick = "" />
<cfquery name="qPick" datasource="#variables.dsn#" cachedwithin="#CacheTime#">
SELECT AccountTypeCode, AccountType
FROM tblAccountType
WHERE 1 = 1
ORDER BY tblAccountType.SortPosition
</cfquery>
<cfreturn Duplicate(qPick)>
</cffunction>
Then call it:
<cfinvoke component="#APPLICATION.DIR#CFC2\AccountTypeDAO" method="pick" returnVariable="AccountTypeQ">
<cfdump var="#AccountTypeQ#">
<cfabort>
Actual Result:
Query result is empty
Expected Result:
A list of account AccountTypeCode, AccountType - about 5 records in my case
Any Workarounds:
Remove the duplicate in the method:
<cfreturn qPick>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4147446
External Customer Info:
External Company:
External Customer Name: mark landmann
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: