[jOOQ/jOOQ#8353] Added a warning when embeddable definitions lack fields
This commit is contained in:
parent
eb10240431
commit
72c259a48a
@ -1900,6 +1900,11 @@ public abstract class AbstractDatabase implements Database {
|
||||
if (embeddable.getTables() != null && !matches(patterns.pattern(embeddable.getTables()), table))
|
||||
continue embeddableLoop;
|
||||
|
||||
if (embeddable.getFields().isEmpty()) {
|
||||
log.warn("Illegal embeddable", "An embeddable definition must have at least one field declaration");
|
||||
continue embeddableLoop;
|
||||
}
|
||||
|
||||
List<ColumnDefinition> columns = new ArrayList<>();
|
||||
List<String> names = new ArrayList<>();
|
||||
|
||||
@ -1914,7 +1919,6 @@ public abstract class AbstractDatabase implements Database {
|
||||
matched = columns.add(column) && names.add(defaultIfEmpty(embeddableField.getName(), column.getName()));
|
||||
}
|
||||
|
||||
|
||||
if (columns.size() == embeddable.getFields().size()) {
|
||||
CatalogDefinition catalog = getCatalog(embeddable.getCatalog());
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user