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.