Thanks for your report, Jens, I don't think this has been a known issue so far, so yes, please, can you create one here: https://github.com/jOOQ/jOOQ/issues/new/choose
Best Regards, Lukas On Thu, Dec 8, 2022 at 4:16 PM Jens Teglhus Møller <[email protected]> wrote: > Hi > > I just ran into a join query that broken when I added .useIndex("index) on > the table. > > create.select().from(TBL_A).join(TBL_B).onKey() > > works but when adding useIndex("idx_tbl_a_myidx"): > > create.select().from(TBL_A.useIndex("idx_tbl_a_myidx")).join(TBL_B).onKey() > > it fails with the following stacktrace: > > org.jooq.exception.DataAccessException: No matching Key found between > tables ["tbl_a" use index ("idx_tbl_a_myidx")] and ["tbl_b"] > at org.jooq.impl.JoinTable.onKeyException(JoinTable.java:775) > ~[jooq-3.16.11.jar:na] > at org.jooq.impl.JoinTable.onKey(JoinTable.java:695) > ~[jooq-3.16.11.jar:na] > at org.jooq.impl.JoinTable.onKey(JoinTable.java:151) > ~[jooq-3.16.11.jar:na] > at > org.jooq.impl.SelectQueryImpl.addJoinOnKey(SelectQueryImpl.java:4388) > ~[jooq-3.16.11.jar:na] > at org.jooq.impl.SelectImpl.onKey(SelectImpl.java:2196) > ~[jooq-3.16.11.jar:na] > at org.jooq.impl.SelectImpl.onKey(SelectImpl.java:143) > ~[jooq-3.16.11.jar:na] > > It seems like the HintedTable that is created loses its key information or > perhaps it is because the tables is aliased (indirectly by the index hint). > > Is this a know limitation or should I create an issue? > > This is jooq on 3.16.11. > > 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/3b0b5315-a646-4a80-b042-83f7bc38b42an%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/3b0b5315-a646-4a80-b042-83f7bc38b42an%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/CAB4ELO4isKOBmpLvupgU7%2BN1ZSLnnT0mP7JEXhzAku1oTC2ang%40mail.gmail.com.
