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

Nested joins do not check if already joined #30

Open
hkdobrev opened this issue Nov 7, 2013 · 0 comments
Open

Nested joins do not check if already joined #30

hkdobrev opened this issue Nov 7, 2013 · 0 comments
Labels

Comments

@hkdobrev
Copy link
Contributor

hkdobrev commented Nov 7, 2013

When you have a query builder like:

$query = Jam::all('a')
    ->join_nested('b')
        ->join('c')
    ->end();

and later on you have:

$query
    ->join_nested('b')
        ->join('c')
    ->end();

Jam would check that you have already joined "b", but it would not check that you have already joined "c". As a result it would trigger a MySQL error saying:

Not unique table/alias: 'c'

@ghost ghost assigned hkdobrev Nov 9, 2013
@hkdobrev hkdobrev removed their assignment Aug 30, 2016
@hkdobrev hkdobrev added the bug label Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant