mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
fixed: CommonsDialectImpl.forUpdateByQuery support schema .
This commit is contained in:
parent
5791698efa
commit
b42ddf885f
@ -236,8 +236,10 @@ public class CommonsDialectImpl implements IDialect {
|
|||||||
throw FlexExceptions.wrap("update sql must need 1 table.");
|
throw FlexExceptions.wrap("update sql must need 1 table.");
|
||||||
}
|
}
|
||||||
|
|
||||||
String tableName = queryTables.get(0).getName();
|
//fix: support schema
|
||||||
sql.append("UPDATE ").append(wrap(getRealTable(tableName))).append(" SET ");
|
QueryTable queryTable = queryTables.get(0);
|
||||||
|
// String tableName = queryTables.get(0).getName();
|
||||||
|
sql.append("UPDATE ").append(queryTable.toSql(this)).append(" SET ");
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (String modifyAttr : modifyAttrs) {
|
for (String modifyAttr : modifyAttrs) {
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user