[jOOQ/jOOQ#4793] Fix rendering of mapped catalog
This commit is contained in:
parent
b5e76e076f
commit
da129e2bee
@ -414,7 +414,9 @@ public class SchemaMapping implements Serializable {
|
||||
|
||||
// The configured default schema is mapped to "null". This prevents
|
||||
// it from being rendered to SQL
|
||||
if ("".equals(result.getName()) || result.getName().equals(mapping().getDefaultSchema()))
|
||||
if ("".equals(result.getName())
|
||||
|| result.getName().equals(mapping().getDefaultSchema())
|
||||
&& (result.getCatalog() == null || result.getCatalog().getName().equals(mapping().getDefaultCatalog())))
|
||||
result = null;
|
||||
|
||||
return result;
|
||||
|
||||
@ -85,7 +85,8 @@ public class CatalogImpl extends AbstractNamed implements Catalog {
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
ctx.visit(getUnqualifiedName());
|
||||
Catalog mappedCatalog = Tools.getMappedCatalog(ctx.configuration(), this);
|
||||
ctx.visit(mappedCatalog != null ? mappedCatalog.getUnqualifiedName() : getUnqualifiedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user