[jOOQ/jOOQ#17672] Misleading warning about configured schemas in code generator, when the database doesn't supply any schemata

This commit is contained in:
Lukas Eder 2024-11-27 08:47:43 +01:00
parent c743b89844
commit 073411a51d

View File

@ -835,6 +835,8 @@ public abstract class AbstractDatabase implements Database {
if (schemata == null) {
schemata = new ArrayList<>();
// [#17672] Eager initialise the input schemata in case getSchemata0() doesn't return any.
getInputSchemata();
onError(ERROR, "Could not load schemata", () -> schemata = sort(getSchemata0()));
schemata.removeIf(schema -> !getInputSchemata().contains(schema.getName()));