Uploaded image for project: 'Lucee Development'
  1. LDEV-173

Query.cfc Query of Queries fails when "Q" is used as the name of the query attribute

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.5.1.000
    • Fix Version/s: 5.0.1.75
    • Labels:
      None

      Description

      When using the query.cfc to perform a query of queries, if you pass the query attribute in as "q" it fails with an error:
      Can't cast String [] to a value of type [query]

      Here's an example:

      q1 = queryNew( "id,name", "integer,varchar", [ 
              {id=1,name="One"}, 
              {id=2,name="Two"}, 
              {id=3,name="Three"} 
            ]); 
      
      qoq = new Query(
          dbtype = "query",
          sql = "SELECT * FROM q WHERE id <> 3 ",
          q = q1
      ).execute();
      
      writeDump([
         q1,
         qoq.getResult()
      ]); 
      

      You can run the above example at trycf.com to see the error:
      http://trycf.com/gist/dd4a2e70bfed2b5db499/lucee

      Notice if you change the argument "q" to anything else it works. Like this: http://trycf.com/gist/47d9508d9e7c3ef20d96/lucee

      Both the above examples work on ACF 10.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              abramadams abramadams (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: