Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary JOIN problem #112

Closed
birko opened this issue Jul 11, 2014 · 2 comments
Closed

Arbitrary JOIN problem #112

birko opened this issue Jul 11, 2014 · 2 comments

Comments

@birko
Copy link

birko commented Jul 11, 2014

Hello. I created a query using Doctrine2 (2.3 and above version) Arbitrary join syntax

$productQueryBuilder->leftJoin("NeonusNwsProductPriceBundle:Price", "pp", \Doctrine\ORM\Query\Expr\Join::WITH, 'p.id=pp.product');

and I got an error with this text
"Cannot count query which selects two FROM components, cannot make distinction"

Can you please help me how to make a workaround for this?
I need this kind of join to sort my Product table according Price table that has an unidirectional ManyToOne reference to product, (Because of my modular architecture) therefor I cannot use normal leftjoin.

Thank you for your reply and suggestions

@adrienrusso
Copy link

+1

@birko
Copy link
Author

birko commented Sep 3, 2014

I am solving this issue in this PR doctrine/orm#1092 I figured out it is the doctrine2 count query walker that needed a fix

@Nek- Nek- closed this as completed Sep 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants