diff --git a/changelog.md b/changelog.md index e861b4c43..8b8a545b7 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed +- [Fixed the issue related to existing configurations in Config.toml file](https://github.com/ballerina-platform/persist-tools/issues/314) - [Fix the logic in persist client generation with respect to refColumns in the joinMetadata](https://github.com/ballerina-platform/persist-tools/issues/312) ## [1.2.0] - 2023-09-19 diff --git a/persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_5/Config.toml b/persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_5/Config.toml index dddc88d62..71c3b04d0 100644 --- a/persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_5/Config.toml +++ b/persist-cli-tests/src/test/resources/test-src/input/tool_test_generate_5/Config.toml @@ -4,3 +4,6 @@ port = 3306 user = "root" password = "" database = "" + +[persist_generate_5.connectionOptions.ssl] +allowPublicKeyRetrieval=true diff --git a/persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_5/Config.toml b/persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_5/Config.toml index 0616ed500..71c3b04d0 100644 --- a/persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_5/Config.toml +++ b/persist-cli-tests/src/test/resources/test-src/output/tool_test_generate_5/Config.toml @@ -5,3 +5,5 @@ user = "root" password = "" database = "" +[persist_generate_5.connectionOptions.ssl] +allowPublicKeyRetrieval=true diff --git a/persist-cli/src/main/java/io/ballerina/persist/nodegenerator/SourceGenerator.java b/persist-cli/src/main/java/io/ballerina/persist/nodegenerator/SourceGenerator.java index 632d585c6..513d77be5 100644 --- a/persist-cli/src/main/java/io/ballerina/persist/nodegenerator/SourceGenerator.java +++ b/persist-cli/src/main/java/io/ballerina/persist/nodegenerator/SourceGenerator.java @@ -254,7 +254,6 @@ private SyntaxTree getUpdateConfigTomlSyntax(Path configPath, String moduleName, moduleMembers = moduleMembers.add(member); if (node.identifier().toSourceCode().trim().equals(moduleName)) { configExists = true; - break; } } else if (member instanceof TableArrayNode) { moduleMembers = moduleMembers.add(member);