Skip to main content
johnbond311
Participant
January 28, 2026
Question

Undocumented changes to Query of Queries in CF2025

  • January 28, 2026
  • 3 replies
  • 114 views

We’re updating an app from CF2021 to CF2025 but are running into issues with Query of Queries behavior changes and I haven’t seen them mentioned in any of the release documentation.

  1. Aggregate functions now return a row if there is no group by clause and the where condition fails.
<cfset foo = queryNew(
"id,total",
"integer,integer",
[
{ id = 1, total = 25 },
{ id = 2, total = 50 },
{ id = 3, total = 100 }
]
)>

<cfquery name="bar" dbtype="query">
select sum(total) total
from foo
where id = 20
</cfquery>

<cfdump var=#foo# />
<cfdump var=#bar# />

The above is an example where the dump of #bar# will have 0 rows in CF2023 and below and will have 1 row in CF2025 with the value being an empty string. If `group by id` is added, all versions return 0 rows.

  1. Values that are NULL the database are no longer treated as NULLs and are treated as empty strings instead.
<cfset foo = queryNew(
"id,total",
"integer,varchar",
[
{ id = 1 },
{ id = 2, total = 50 },
{ id = 3, total = 100 }
]
)>

<cfquery name="bar" dbtype="query">
select *
from foo
where total is null
</cfquery>

<cfdump var=#foo# />
<cfdump var=#bar# />

The above is an example where the dump of #bar# will have 1 row in CF2023 and below and will have 0 rows in CF2025. If the condition is changes to `where total = ''` then CF2025 will return 1 row but CF2023 and below return 0 rows.

We can work around these changes, but we are concerned there may be more changes lurking that we haven’t uncovered yet. Can you please provide a list of all changes to QoQs and if there is any way to re-enable old behavior?

Thanks!

    3 replies

    Paolo Olocco
    Participating Frequently
    February 3, 2026

    Hi everyone,
    I'm joining this thread because support can't give me the right reasons, but here, thanks to you in the community, I see that this is a problem for others as well as us.

     

    I'm putting an example here to make it clear that in my opinion it's a bug because with CF2025 it's no longer possible to differentiate between NULLs and empty strings:

    <cfscript>
    //query
    myQuery = queryNew("id,name,amount,revenue","Integer,Varchar,Integer,Integer",
    [
    {id=1,name="One",amount=15,revenue=35},
    {id=2,name=JavaCast("null", ""),amount=18,revenue=41},
    {id=3,name="Three",amount=32,revenue=73},
    {id=4,name="",amount=2,revenue=5}
    ]);
    writeOutput("The new query is:");
    writeDump(myQuery);
    </cfscript>

    <!--- QoQ with only nulls --->
    <cfquery name="QoQ1" dbtype="query">
    select *
    from myQuery
    where name is null
    </cfquery>
    <cfoutput><br>The QoQ1 with only nulls:</cfoutput>
    <cfdump var="#QoQ1#" label="only nulls">

    <!--- QoQ with only empty string --->
    <cfquery name="QoQ2" dbtype="query">
    select *
    from myQuery
    where name = ''
    </cfquery>
    <cfoutput><br>The QoQ2 with only empty string:</cfoutput>
    <cfdump var="#QoQ2#" label="only empty string">

    <!--- QoQ with nulls and empty string --->
    <cfquery name="QoQ3" dbtype="query">
    select *
    from myQuery
    where name is null or name = ''
    </cfquery>
    <cfoutput><br>The QoQ3 with nulls and empty string:</cfoutput>
    <cfdump var="#QoQ3#" label="nulls and empty string">

     

    I agree with Charlie that it is missing from the documentation, but having a regression like this without giving the possibility to configure it is a big limitation.

    QoQ has always been a strong point of ACF, but with this version in my opinion it has lost it.

     

    I hope and trust that it will be resolved or at least managed 🙏

     

    BKBK
    Community Expert
    Community Expert
    February 4, 2026

    Hi ​@Paolo Olocco , I would suggest you add the setting this.enableNullSupport = true in Application.cfc, to make your example complete. That said, your assertion of a bug is true. See https://tracker.adobe.com/#/view/CF-4229926

    ashuspeed
    Participant
    January 29, 2026

    @johnbond311 : we had an issue logged related to this, which we have fixed. Please see the details in https://tracker.adobe.com/#/view/CF-4211230, I will get this added to the documentation.

    johnbond311
    Participant
    January 29, 2026

    Thanks, I see that is for the aggregates change but what about the NULL support change (my number 2 in the post)?

    Charlie Arehart
    Community Expert
    Community Expert
    January 28, 2026

    John, a few things.

     

    1) First yes this is indeed a known (and documented) change of behavior in CF2025.

     

    See the QofQ docs, and the section, “Behavior changes in ColdFusion (2025 release) for empty result sets”. (And one of the examples on that page does look just like what you’re doing. And while you’re not using queryexecute as discussed there it applies just as readily to the cfquery you’re doing. I’ve run your code and can confirm seeing the same result you did.)

     

    2) And no, it seems you cannot control the behavior to revert to the old way. The doc page instead discusses how to programmatically deal with the change instead. (Don’t shoot me: I’m only the messenger.)

     

    And FWIW I also confirmed the behavior doesn’t change based on whether “enablenullsupport” is enabled at the app level or server level, which someone might reasonably wonder. (And I even edited the cfm file in question to force its recompilation, in case that was a factor in causing this null support change to take effect.)

    3) You also ask if “that’s it” about changes regarding QofQ. I can confirm it is NOT the only change in CF2025 regarding Q of Q, though sadly that one section is (currently) the only one that mentions CF 2025 on that page. 

     

    Instead note that the “what’s new in 2025” page mentions that in fact the bitwise and modulus operator support in QofQ (which IS discussed on that Q of Q page above) is ALSO new in 2025.  Sadly also, that doc page on Q of Q makes no mention of those two being new as of 2025 (but to be clear the what’s new page does link directly to the sections on those two features within that QofQ page.) 

     

    As lamentable, the what’s new page doesn’t mention this change about qofq and nulls. It’s indeed unfortunate when the docs aren’t as clear as they could be. I will report both these things as a bug report (we can file bug reports about docs, at tracker.adobe.com).

     

    So finally could there be something else still that was new in 2025 and not clear from either page? Perhaps. But I think between those two docs this seems to cover it. Only time will tell, as more and more people move to 2025. Your note here is helping advance the cause of understanding the differences.

     

    Hope that helps as at least AN answer to your key questions.

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    January 28, 2026

    As an update, I tried to file the bug report but the tracker site is currently being unresponsive (to adding a bug or searching for them),  which I have reported to Adobe.

    /Charlie (troubleshooter, carehart. org)
    johnbond311
    Participant
    January 28, 2026

    Thanks, Charlie. I see the mention of aggregates in the docs you linked, but I don’t see anything about checking for nulls no longer working. Thanks for reporting to Adobe - hopefully there will be something in the response to that to clear things up.