Pārlūkot izejas kodu

update语句解析,得到表有错bug修复

willenfoo 7 gadi atpakaļ
vecāks
revīzija
35270f5c19

+ 1 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/IllegalSQLInterceptor.java

@@ -111,7 +111,7 @@ public class IllegalSQLInterceptor implements Interceptor {
 		} else if (statement instanceof Update) {
 			Update update = (Update) statement;
 			where = update.getWhere();
-			table = (Table)update.getFromItem();
+			table = update.getTables().get(0);
 			joins = update.getJoins();
 		} else if (statement instanceof Delete) {
 			Delete delete = (Delete)statement;