[jOOQ/jOOQ#18202] Do this fix *only* for UDTPathField
User input fields may be unqualified.
This commit is contained in:
parent
78c096b98b
commit
c0f49a4cf2
@ -124,12 +124,14 @@ implements
|
||||
// [#18202] Don't render the EXCLUDED name here in case it needs to be enclosed
|
||||
// in parentheses, e.g. in a UDTPathField
|
||||
Table<?> t = (Table<?>) ctx.data(SimpleDataKey.DATA_DML_TARGET_TABLE);
|
||||
ctx.scopeRegister(t, false,
|
||||
ctx.data(ExtendedDataKey.DATA_INSERT_ON_DUPLICATE_KEY_UPDATE) != null
|
||||
? table(name("t"))
|
||||
: table(N_EXCLUDED))
|
||||
.visit(field)
|
||||
.scopeRegister(t, false, null);
|
||||
Table<?> e = ctx.data(ExtendedDataKey.DATA_INSERT_ON_DUPLICATE_KEY_UPDATE) != null
|
||||
? table(name("t"))
|
||||
: table(N_EXCLUDED);
|
||||
|
||||
if (field instanceof UDTPathField)
|
||||
ctx.scopeRegister(t, false, e).visit(field).scopeRegister(t, false, null);
|
||||
else
|
||||
ctx.visit(e).sql('.').qualify(false, c -> c.visit(field));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user