[jOOQ/jOOQ#17402] DefaultGeneratorStrategy should guard against path

classes receiving the same name as their enclosing class
This commit is contained in:
Lukas Eder 2024-10-01 11:11:01 +02:00
parent 26f39d7248
commit 8f689c6a1c

View File

@ -330,6 +330,10 @@ class GeneratorStrategyWrapper extends AbstractDelegatingGeneratorStrategy {
className = delegate.getJavaClassName(definition, mode);
className = overload(definition, mode, className);
// [#17402] Don't allow nested Path classes to be named the same as the Table
if (definition instanceof TableDefinition && mode == Mode.PATH && className.equals(getJavaClassName(definition)))
className += "Path";
return fixJavaClassName(className);
}