fix: remove "hack" to skip schema-mapped models (#19191)

That method relied on the faulty assumption that toModelFilename does not consider mappings, which is not the case for multiple generators.
This commit is contained in:
Daniel Seiler 2024-08-04 12:16:50 +02:00 committed by GitHub
parent aa7c62abb7
commit 2c2d6905cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -469,14 +469,7 @@ public class DefaultGenerator implements Generator {
try {
//don't generate models that have an import mapping
if (config.schemaMapping().containsKey(name)) {
LOGGER.debug("Model {} not imported due to import mapping", name);
for (String templateName : config.modelTemplateFiles().keySet()) {
// HACK: Because this returns early, could lead to some invalid model reporting.
String filename = config.modelFilename(templateName, name);
Path path = java.nio.file.Paths.get(filename);
this.templateProcessor.skip(path, "Skipped prior to model processing due to schema mapping.");
}
LOGGER.info("Model {} not generated due to schema mapping", name);
continue;
}