Skip to content

fix: pass databaseId in XMLStatementBuilder constructor chain#3664

Open
cuiweixie wants to merge 1 commit intomybatis:masterfrom
cuiweixie:fix/xml-statement-builder-database-id
Open

fix: pass databaseId in XMLStatementBuilder constructor chain#3664
cuiweixie wants to merge 1 commit intomybatis:masterfrom
cuiweixie:fix/xml-statement-builder-database-id

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

Fixes incorrect delegation in XMLStatementBuilder(Configuration, MapperBuilderAssistant, XNode, String databaseId): it now passes the databaseId argument into the five-argument constructor instead of null, so databaseId is preserved when parsing XML mapper statements.

Context

The previous code called this(configuration, builderAssistant, context, null, null), which dropped the configured database id before parseStatementNode() ran.

The four-argument constructor that accepts databaseId delegated to the five-argument constructor with null for databaseId, so the value was dropped before statement parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant