What happened?
Description
We noticed that after updating to Craft 4.9, one of our queries wasn't running properly. The logic for this particular query depends on the EntryQuery::EVENT_BEFORE_PREPARE event. In particular, in depended on the orderBy property to be null for for count queries to run properly.
Now however, because of this change, the orderBy property is not being nulled like it was before with yiii\db\Query::queryScaler method.
I'm not sure if this was on purpose? Either way would it be possible to either:
a) keep the queryScaler logic from yiii\db\Query::queryScaler for scalar queries (count, min, max, etc) so that things run like they did before the change OR
b) add a property to ElementQuery, something like queryMethod, so that events can add that logic back if the query is a scalar query?
Craft CMS version
Craft 4.9.0
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
What happened?
Description
We noticed that after updating to Craft 4.9, one of our queries wasn't running properly. The logic for this particular query depends on the
EntryQuery::EVENT_BEFORE_PREPAREevent. In particular, in depended on theorderByproperty to be null for for count queries to run properly.Now however, because of this change, the
orderByproperty is not being nulled like it was before withyiii\db\Query::queryScalermethod.I'm not sure if this was on purpose? Either way would it be possible to either:
a) keep the queryScaler logic from
yiii\db\Query::queryScalerfor scalar queries (count, min, max, etc) so that things run like they did before the change ORb) add a property to ElementQuery, something like
queryMethod, so that events can add that logic back if the query is a scalar query?Craft CMS version
Craft 4.9.0
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response