query.map mishandles the "template" query

Description

See http://blog.adamcameron.me/2017/04/cfml-lucee-13-v-4-14-v-6-coldfusion-we.html

Query.map and queryMap take a parameter of type query which specifies the definition of the query that should be returned. This is not uses properly in two ways, as demonstrated by this test case:

Both of these fail:

  • the columns from queryWithDifferentColumns should be the only columns in the resultant query. however these columns are just added to the original query

  • the queryWithDifferentColumns should not change: it's just a template. However it seems this is replaced by the remapped query.

Contrast this with CF on which both tests pass.

Environment

None

Assignee

Michael Offner

Reporter

Adam Cameron

Priority

Critical

Labels

None

Fix versions

Sprint

None

Affects versions

Configure