Suppressed undeclared primary key warning when schema tagged as indexed

This commit is contained in:
Collin Smith 2021-01-08 19:01:49 -08:00
parent fe19de2033
commit 2ab7c7ceb0

View File

@ -62,9 +62,11 @@ final class SchemaElement {
return null;
}
context.warn(element,
"{element} did not declare any valid {}, using {}",
PrimaryKey.class, primaryKeyFieldElement);
if (!annotation.indexed()) {
context.warn(element,
"{element} did not declare any valid {}, using {}",
PrimaryKey.class, primaryKeyFieldElement);
}
}
TableElement tableElement = TableElement.get(context, typeElement);