[PR #7641] fix: COUNT() being casted as string #10578

Open
opened 2026-01-22 16:08:01 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/7641

State: closed
Merged: No


Some functions have a predefined type and could be resolved correctly by the SQLWalker. I don't want to change things too much but it could be possible to do the same thing for other functions like SUM for instance that would be resolved to float.

A much better solution would be to retrieve the aggregateExpression, then the pathExpression to resolve the type from the field but it's not feasable without an accessor from FunctionNode class.

**Original Pull Request:** https://github.com/doctrine/orm/pull/7641 **State:** closed **Merged:** No --- Some functions have a predefined type and could be resolved correctly by the SQLWalker. I don't want to change things too much but it could be possible to do the same thing for other functions like SUM for instance that would be resolved to float. A much better solution would be to retrieve the aggregateExpression, then the pathExpression to resolve the type from the field but it's not feasable without an accessor from FunctionNode class.
admin added the pull-request label 2026-01-22 16:08:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10578