Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message when ON KEY finds ambiguous keys #15088

Closed
lukaseder opened this issue May 17, 2023 · 1 comment
Closed

Misleading error message when ON KEY finds ambiguous keys #15088

lukaseder opened this issue May 17, 2023 · 1 comment

Comments

@lukaseder
Copy link
Member

The error message when ON KEY finds ambiguous keys between two tables is misleading:

org.jooq.exception.DataAccessException: Key ambiguous between tables ["PUBLIC"."T_BOOK"] and ["PUBLIC"."T_AUTHOR"]. Found: null and null
	at org.jooq.impl.JoinTable.onKeyException(JoinTable.java:832)
	at org.jooq.impl.JoinTable.onKey(JoinTable.java:741)
	at org.jooq.impl.JoinTable.onKey(JoinTable.java:1)
	at org.jooq.impl.SelectQueryImpl.addJoinOnKey(SelectQueryImpl.java:4783)
	at org.jooq.impl.SelectImpl.onKey(SelectImpl.java:2209)
	at org.jooq.impl.SelectImpl.onKey(SelectImpl.java:1)
	at org.jooq.test.all.testcases.InlineDerivedTableTests.testInlineDerivedTableWithInnerJoinOnKey(InlineDerivedTableTests.java:154)
	at org.jooq.test.jOOQAbstractTest.testInlineDerivedTableWithInnerJoinOnKey(jOOQAbstractTest.java:11722)

This Found: null and null isn't really helpful. The ambiguous keys could be listed, as they're available in the onKey() method in question.

@lukaseder
Copy link
Member Author

Fixed in jOOQ 3.19.0, 3.18.5 (#15089), 3.17.14 (#15090), and 3.16.20 (#15091)

3.19 Other improvements automation moved this from To do to Done May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant