Well as you see in the API the join also needs a JoinCondition, it needs three objects. We cannot use the "where" to specify the join condition without doing some pretty confusing abstractions I imagine.

The concept does make sense to me as is, especially when you think in terms of Sources not tables. i. e. you select from a Join source.

Hopefully I will get back online soon and finish the prototype off.

Lukas Kahwe Smith <notifications@github.com> wrote:
>> +            array('from', 'From'),
>> +            array('orderBy', 'OrderBy'),
>> +            array('select', 'Select'),
>> +        );
>> +    }
>> +
>> +    public function testApi1()
>> +    {
>> +        $this->node
>> +            ->select()
>> +                ->property('foobar', 'a')
>> +                ->property('barfoo', 'a')
>> +            ->end()
>> +            ->from()
>> +                ->joinInner()
>> +                    ->left()->document('foobar', 'a')->end()
>
>Ah you are referring to
>https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QOM/JoinInterface.php#L32
>
>As someone with a strong SQL background I find this quite confusing and
>also doesn't match SQL2:
>http://www.h2database.com/jcr/grammar.html#join
>
>But I guess there is some sense in following QOM for a QB.
>
>However I still do not understand why this would be preferred over:
>```
>->from('foobar', 'a'))
>->joinRightInner('barfoo', 'b')
>```
>..
>
>```
>->from('foobar', 'a'))
>->joinRightInner('barfoo', 'b')
>->joinRightInner('barfooca', 'c')
>```
>
>etc.
>
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/doctrine/phpcr-odm/pull/318/files#r5953344

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.