[jOOQ/jOOQ#14876] Add warnings to manual and Javadoc about ON KEY ambiguity caveats

This commit is contained in:
Lukas Eder 2023-03-29 11:21:01 +02:00
parent e118471806
commit 838e24d50c
3 changed files with 24 additions and 6 deletions

View File

@ -204,7 +204,10 @@ public interface SelectOnStep<R extends Record> {
*
* @see TableOnStep#onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@NotNull @CheckReturnValue
@Support
@ -218,7 +221,10 @@ public interface SelectOnStep<R extends Record> {
*
* @see TableOnStep#onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@NotNull @CheckReturnValue
@Support

View File

@ -294,7 +294,10 @@ public interface SelectQuery<R extends Record> extends Select<R>, ConditionProvi
* @param type The type of join
* @see TableOnStep#onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@Support
void addJoinOnKey(TableLike<?> table, JoinType type) throws DataAccessException;
@ -307,7 +310,10 @@ public interface SelectQuery<R extends Record> extends Select<R>, ConditionProvi
* @param keyFields The foreign key fields
* @see TableOnStep#onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@Support
void addJoinOnKey(TableLike<?> table, JoinType type, TableField<?, ?>... keyFields) throws DataAccessException;

View File

@ -190,7 +190,10 @@ public interface TableOnStep<R extends Record> {
*
* @see #onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@NotNull
@Support
@ -204,7 +207,10 @@ public interface TableOnStep<R extends Record> {
*
* @see #onKey(ForeignKey)
* @throws DataAccessException If there is no non-ambiguous key definition
* known to jOOQ
* known to jOOQ. <em>Please note that if you evolve your
* schema, a previously non-ambiguous <code>ON KEY</code> clause
* can suddenly become ambiguous on an existing query, so use
* this clause with care.</em>
*/
@NotNull
@Support