maxmello
11/20/2020, 10:09 AMOrderItems.deleteWhere { OrderItems.id inSubQuery ( OrderItems.innerJoin(Orders).innerJoin(Items).slice(Orders.id).select { Orders.status eq 0 and (Items.alias eq "String") } ) }
(untested) would probably work as a workaround. It seems that deleteWhere is only available from a Table
, not a Join
or their superclass ColumnSet
. The delete implementation does not seem to support DELETE <TableName> FROM …:
package org.jetbrains.exposed.sql.vendors // Default.kt
open fun delete(
ignore: Boolean,
table: Table,
where: String?,
limit: Int?,
transaction: Transaction
): String {
// ...
return buildString {
append("DELETE FROM ")
append(transaction.identity(table))
if (where != null) {
append(" WHERE ")
append(where)
}
// ...
}
}
Pavel Naumov
11/20/2020, 10:16 AM