[jOOQ/jOOQ#15088] Misleading error message when ON KEY finds ambiguous keys

This commit is contained in:
Lukas Eder 2023-05-17 15:50:07 +02:00
parent 59db3a9183
commit 6511bf19ae

View File

@ -736,9 +736,9 @@ implements
return onKey((ForeignKey<?, ?>) rightToLeft.get(0), rhs, lhs);
if (rightToLeft.isEmpty() && leftToRight.isEmpty())
throw onKeyException(OnKeyExceptionReason.NOT_FOUND, leftToRight, rightToLeft);
throw onKeyException(OnKeyExceptionReason.NOT_FOUND, null, null);
else
throw onKeyException(OnKeyExceptionReason.AMBIGUOUS, null, null);
throw onKeyException(OnKeyExceptionReason.AMBIGUOUS, leftToRight, rightToLeft);
}
@Override