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

query criteria - problem when more than 1 leftJoin() #2157

Closed
wojtek77 opened this issue Mar 12, 2014 · 3 comments
Closed

query criteria - problem when more than 1 leftJoin() #2157

wojtek77 opened this issue Mar 12, 2014 · 3 comments

Comments

@wojtek77
Copy link

For this code:

$result = Models\Uzytkownicy::query()
                ->leftJoin('Models\Testerzy')
                ->leftJoin('Models\Inzynierowie')
                ->execute();

is error: PhalconException: Scanning error before '] JOIN [] JOIN [...' when parsing: SELECT [Models\Uzytkownicy].* FROM [Models\Uzytkownicy] LEFT JOIN [Models\Testerzy] JOIN [] JOIN [] JOIN [] JOIN

When is this code:

$result = Models\Uzytkownicy::query()
                ->leftJoin('Models\Testerzy')
//                ->leftJoin('Models\Inzynierowie')
                ->execute();

is OK.


I use Phalcon 1.2.6 x86 on Windows 7 64 bit, Wamp 32 bit

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@maxgalbu
Copy link
Contributor

Here's the discussion about it:
http://forum.phalconphp.com/discussion/1479/multiple-joins-in-oo-notation-fail

A temporary solution is to use Phalcon\Mvc\Model\Query\Builder until this bug is fixed

@wojtek77 wojtek77 reopened this Mar 12, 2014
@wojtek77
Copy link
Author

Thank you for your quick response and I am sorry that I have already discussed the problem of previously reported.

@maxgalbu
Copy link
Contributor

@wojtek77 sorry, my comment was just a temporary solution that i recommend to you until this bug is fixed
you can leave the issue open, so others can find it and see the status of the bug resolution

(tldr: please reopen it, this is actually a bug :-)

@wojtek77 wojtek77 reopened this Mar 12, 2014
maxgalbu added a commit to maxgalbu/cphalcon that referenced this issue Mar 20, 2014
maxgalbu added a commit to maxgalbu/cphalcon that referenced this issue Mar 22, 2014
maxgalbu added a commit to maxgalbu/cphalcon that referenced this issue Mar 28, 2014
phalcon pushed a commit that referenced this issue Mar 31, 2014
criteria: fix issue #2157 and added tests
phalcon pushed a commit that referenced this issue Mar 31, 2014
criteria: fix issue #2157 and added tests
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

4 participants