[jOOQ/jOOQ#18202] DSL.excluded with UDTField creates query with syntax error
This commit is contained in:
parent
79c88c3031
commit
31dc00fb1d
@ -121,11 +121,15 @@ implements
|
||||
default:
|
||||
// [#7552] When emulating INSERT .. ON DUPLICATE KEY UPDATE using
|
||||
// MERGE, the EXCLUDED pseudo table is called "t", instead
|
||||
ctx.visit(ctx.data(ExtendedDataKey.DATA_INSERT_ON_DUPLICATE_KEY_UPDATE) != null
|
||||
? name("t")
|
||||
: N_EXCLUDED)
|
||||
.sql('.')
|
||||
.qualify(false, c -> c.visit(field));
|
||||
// [#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);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user