mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-330: SIZE(collection) generates wrong SQL with COUNT over several fields #408
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 14, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @beberlei:
When using SIZE() it generates wrong sql when more than one join column appears, none of our supported database allows an expression of the kind:
COUNT(p.friend*id, p.person*id)However this happens in a case where you call size on a ManyToMany relation:
Or when the One To Many Join has more than one join column.
My idea: Use count(*) since the problem of NULL is not a problem because of the WHERE condition that explicitly prevents NULLs from appearing in these kind of queries anyways.
@doctrinebot commented on GitHub (Feb 14, 2010):
Comment created by @beberlei:
Fixed.
@doctrinebot commented on GitHub (Feb 14, 2010):
Issue was closed with resolution "Fixed"