[jOOQ/jOOQ#9708] Fix regex based schema mapping (with backreferences)

The way the schema mapping was implemented resulted in the schema
mapping always getting applied twice during the rendering. This was
problematic for regex based schema mappings using backreferences.

This commit changes the schema mapping logic so that
`SchemaMapping#map(Schema)` doesn't "recursively" map schemas. I.e. any
given schema is only mapped once.
This commit is contained in:
Knut Wannheden 2020-01-06 13:29:27 +01:00
parent 680cd20d08
commit 33c517a1c8

View File

@ -293,6 +293,8 @@ public class SchemaMapping implements Serializable {
// [#1774] The default Settings render schema flag takes precedence over
// The DefaultConfiguration's ignoreMapping flag!
if (!renderSchema()) return null;
// [#9708] Don't map an already mapped schema again
else if (schema instanceof RenamedSchema) return schema;
Schema result = schema;
if (result == null)