Skip to content

Commit

Permalink
fix(QueryBuilder): Fix losing defaultOptions when calling newQuery
Browse files Browse the repository at this point in the history
This would manifest itself in losing the `array` return format when
the CFML engine supported native array return types.
  • Loading branch information
elpete committed Mar 14, 2023
1 parent a2e088d commit 4e713d4
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions models/Query/QueryBuilder.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -3673,9 +3673,6 @@ component displayname="QueryBuilder" accessors="true" {
* @return qb.models.Query.QueryBuilder
*/
public QueryBuilder function setReturnFormat( required any format ) {
if ( supportsNativeReturnType() ) {
structDelete( variables.defaultOptions, "returntype" );
}
if ( isClosure( arguments.format ) || isCustomFunction( arguments.format ) ) {
variables.returnFormat = format;
} else if ( arguments.format == "array" ) {
Expand Down

1 comment on commit 4e713d4

@JamoCA
Copy link

@JamoCA JamoCA commented on 4e713d4 Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just in the process of reporting this. (Some functions that I hadn't initially tested were failing to return data as arrays when the returnFormat param was being explicitly passed.) I tested the update and it works correctly now. Thanks!

Please sign in to comment.