[#2464] Fixed this also for the instance table model
This commit is contained in:
parent
29c68da044
commit
4fd408c5e2
@ -109,9 +109,15 @@ class DeleteQueryImpl<R extends Record> extends AbstractQuery implements DeleteQ
|
||||
|
||||
// [#2464] MySQL supports a peculiar multi-table DELETE syntax for aliased tables:
|
||||
// DELETE t1 FROM my_table AS t1
|
||||
if (getFrom() instanceof TableAlias && asList(MARIADB, MYSQL).contains(context.configuration().dialect())) {
|
||||
context.sql(getFrom())
|
||||
.sql(" ");
|
||||
if (asList(MARIADB, MYSQL).contains(context.configuration().dialect())) {
|
||||
|
||||
// [#2579] TODO: Improve Table API to discover aliased tables more
|
||||
// reliably instead of resorting to instanceof:
|
||||
if (getFrom() instanceof TableAlias ||
|
||||
(getFrom() instanceof TableImpl && ((TableImpl<R>)getFrom()).getAliasedTable() != null)) {
|
||||
context.sql(getFrom())
|
||||
.sql(" ");
|
||||
}
|
||||
}
|
||||
|
||||
context.keyword("from ");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user