The Paginator only supports queries with a single selection root, and there's no workaround for that.
Instead, you will have to write your own pagination logic. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Fri, Jul 18, 2014 at 11:11 AM, František Bereň <[email protected]> wrote: > Hello I have an problem using Arbitrary JOIN problem > I created an issue here for it but, now I noticed the exception is thrown > in Doctrine\ORM\Tools\Pagination\WhereInWalker on line 85 > https://github.com/KnpLabs/knp-components/issues/112 > > Simply the prpblem is > ---- > > 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 > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
