Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 7 comments

2 participants

@doctrinebot

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).

@doctrinebot

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

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

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by darkangel:

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

@doctrinebot

Comment created by @ocramius:

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

@doctrinebot

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.

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.