Skip to content

Nested joins do not check if already joined #30

@hkdobrev

Description

@hkdobrev

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions