Hi Lukas

The onKey() method returns a SelectJoinStep which does not have 
.and()/.or() etc.

I'm on jooq 3.14.15 (provided by spring boot 2.5.10), so maybe this has 
changed in later version, but I could not see it 
in https://www.jooq.org/javadoc/3.16.x/org.jooq/org/jooq/SelectJoinStep.html

Best regards Jens

On Monday, 14 March 2022 at 14:39:06 UTC+1 [email protected] wrote:

> Hi Jens,
>
> Why not just call onKey(...).and(...) as you suggested?
>
> Thanks,
> Lukas
>
> On Mon, Mar 14, 2022 at 1:59 PM Jens Teglhus Møller <
> [email protected]> wrote:
>
>> Hi
>>
>> When doing left outer joins, it would be a nice addition if you could use 
>> onKey() and add extra conditions (since you cannot alway put them in the 
>> where clause and get the same result).
>>
>> Is there a way to do that or is it reasonably easy to implement or 
>> perhaps a workaround.
>>
>> My current workaround is to do a regular .on() and provide the key 
>> columns manually. 
>>
>> I was thinking you could either have onKey() return and 
>> SelectOnConditionStep so you could do onKey().and(...), this will on be 
>> backwards compatible so perhaps a new method onKeyWith(). Or perhaps a way 
>> for a regular .on() to use the default keys as in .on(key()).and(...).
>>
>> And thanks for a great product btw.
>>
>> Best regards Jens
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jooq-user/6b843b80-afa4-4e3f-a0dd-070b9d3d0164n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/6b843b80-afa4-4e3f-a0dd-070b9d3d0164n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/501e5ac0-336e-48d8-8831-22fd0a193d6cn%40googlegroups.com.

Reply via email to