diff --git a/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDeleteStatement.java b/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDeleteStatement.java index fd6d027627..8f43dbe353 100644 --- a/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDeleteStatement.java +++ b/core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDeleteStatement.java @@ -209,6 +209,9 @@ public SQLTableSource getUsing() { } public void setUsing(SQLTableSource using) { + if (using != null) { + using.setParent(this); + } this.using = using; } diff --git a/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleDeleteStatement.java b/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleDeleteStatement.java index f0991b19b9..d8c1a80202 100644 --- a/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleDeleteStatement.java +++ b/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleDeleteStatement.java @@ -38,6 +38,9 @@ public OracleReturningClause getReturning() { } public void setReturning(OracleReturningClause returning) { + if (returning != null) { + returning.setParent(this); + } this.returning = returning; } diff --git a/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleInsertStatement.java b/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleInsertStatement.java index e78497af7f..6393f3b2ea 100644 --- a/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleInsertStatement.java +++ b/core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleInsertStatement.java @@ -64,6 +64,9 @@ public OracleReturningClause getReturning() { } public void setReturning(OracleReturningClause returning) { + if (returning != null) { + returning.setParent(this); + } this.returning = returning; } @@ -72,6 +75,9 @@ public SQLErrorLoggingClause getErrorLogging() { } public void setErrorLogging(SQLErrorLoggingClause errorLogging) { + if (errorLogging != null) { + errorLogging.setParent(this); + } this.errorLogging = errorLogging; }