On Tue, 2 Jul 2024 at 22:01, Lukas Eder <[email protected]> wrote:

Do also check for unique constraints on the foreign key.
>

Good thought, thanks.


> As with any heuristics: Good luck! :)
>

Thanks :-)  For now, I just have to refrain from causing a 1:N where it
might not be, so it should be sufficient.


* is it correct to be using fk.key.fields and fk.inverseKey.fields the way
>> I am?
>>
>
> Why wouldn't it be?
>

Partly because with Kotlin, IDEA doesn't really surface the most likely
methods/properties to the top of the auto-complete list (I'm not sure
why).  I was initially looking for language like 'child' and 'parent' but
all the methods with those names took a parameter I didn't know how to
supply.  (Maybe those methods are useful to my cause, but I'm not sure
how).  Even now, it isn't immediately intuitive that inverseKey.table is
the 'child' table.  But it seems I got that right.


* does JOOQ have a fancier type of join where I don't really need to
>> enumerate the fields in the on() anyway?  (Assuming there is only 1 FK
>> between the tables)
>>
>
> onKey(ForeignKey) would probably help?
>

Yes!  Just the thing!

Thanks,
David.

-- 
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/CAE14wDUe7D%3Dgzh3HK939AVkTnyDkqmNDiLUCGY8jW0xRAh4EuA%40mail.gmail.com.

Reply via email to