DDC-2794: the Paginator does not support arbitrary join #3495

Closed
opened 2026-01-22 14:20:56 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 14, 2013).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user stof:

Using the following query with the paginator fails:

SELECT u
FROM User u
JOIN Message m WITH m.author = u
WHERE m.status = 'draft' -- a condition justifying the join

The CountWalker and the CountOutputWalker both throw a exception saying "Cannot count query which selects two FROM components, cannot make distinction"

This message is wrong (I can make distinction here. Only User is selected in the result set) and confusing (I spent some time finding the second FROM before figuring it was related to the use of an arbitrary join instead of an association join).

Originally created by @doctrinebot on GitHub (Nov 14, 2013). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user stof: Using the following query with the paginator fails: ``` sql SELECT u FROM User u JOIN Message m WITH m.author = u WHERE m.status = 'draft' -- a condition justifying the join ``` The CountWalker and the CountOutputWalker both throw a exception saying "Cannot count query which selects two FROM components, cannot make distinction" This message is wrong (I can make distinction here. Only User is selected in the result set) and confusing (I spent some time finding the second FROM before figuring it was related to the use of an arbitrary join instead of an association join).
admin added the Improvement label 2026-01-22 14:20:56 +01:00
admin closed this issue 2026-01-22 14:20:57 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 14, 2013):

@doctrinebot commented on GitHub (Nov 14, 2013): - depends on [DDC-3233: [GH-1092] Arbitrary Join count walkers solution](http://www.doctrine-project.org/jira/browse/DDC-3233)
Author
Owner

@doctrinebot commented on GitHub (Dec 23, 2013):

Comment created by ppinel:

Hi,

I have the same issue.
My query is : SELECT entity FROM W\XBundle\Entity\X entity LEFT JOIN Z\YBundle\Entity\Y y WITH y.x = entity LEFT JOIN y.v v WHERE v.name LIKE :like

Is there a way to fix this issue ? I really need this to work with the Paginator.

Best,

@doctrinebot commented on GitHub (Dec 23, 2013): Comment created by ppinel: Hi, I have the same issue. `My query is : SELECT entity FROM W\XBundle\Entity\X entity LEFT JOIN Z\YBundle\Entity\Y y WITH y.x = entity LEFT JOIN y.v v WHERE v.name LIKE :like` Is there a way to fix this issue ? I really need this to work with the Paginator. Best,
Author
Owner

@doctrinebot commented on GitHub (Dec 23, 2013):

Comment created by stof:

Why changing the status to "Awaiting feedback" ? It is not waiting for a feedback of the reporter to check the fix. It is an open ticket which does not have a fix yet

@doctrinebot commented on GitHub (Dec 23, 2013): Comment created by stof: Why changing the status to "Awaiting feedback" ? It is not waiting for a feedback of the reporter to check the fix. It is an open ticket which does not have a fix yet
Author
Owner

@doctrinebot commented on GitHub (Sep 22, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 22, 2014): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Sep 30, 2014):

Comment created by darkangel:

Is this going to be back-ported to 2.4.x?

@doctrinebot commented on GitHub (Sep 30, 2014): Comment created by darkangel: Is this going to be back-ported to 2.4.x?
Author
Owner

@doctrinebot commented on GitHub (Oct 1, 2014):

Comment created by @ocramius:

No, this is actually a new supported feature: I'm changing the issue type.

@doctrinebot commented on GitHub (Oct 1, 2014): Comment created by @ocramius: No, this is actually a new supported feature: I'm changing the issue type.
Author
Owner

@doctrinebot commented on GitHub (Feb 19, 2015):

Comment created by Sagar.Lotiya:

This issue should be back-ported to 2.4.x as this seems not just new supported feature but should be present in 2.4 as improvements or fix.

@doctrinebot commented on GitHub (Feb 19, 2015): Comment created by Sagar.Lotiya: This issue should be back-ported to 2.4.x as this seems not just new supported feature but should be present in 2.4 as improvements or fix.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3495