juicewcode commented on PR #7003:
URL: https://github.com/apache/shenyu/pull/7003#issuecomment-5527104477

   > ## Review: Correct namespaceId jdbcType bindings (#6718)
   > **Verdict: APPROVE**
   > 
   > ### Analysis
   > `namespace_id` is a string (VARCHAR) column, but two MyBatis bindings 
incorrectly declared `jdbcType=TINYINT`, which would attempt to bind the 
namespace-id string as a tiny integer and cause type-mismatch / incorrect 
persistence. The PR corrects both:
   > 
   > 1. `meta-data-sqlmap.xml` insert: `#{namespaceId, jdbcType=TINYINT}` → 
`#{namespaceId, jdbcType=VARCHAR}`.
   > 2. `namespace-plugin-rel-sqlmap.xml` query: `AND namespace_id = 
#{namespaceId, jdbcType=TINYINT}` → `AND namespace_id = #{namespaceId, 
jdbcType=VARCHAR}`.
   > 
   > This aligns the binding with the column's real type and with every other 
`namespace_id` mapping in the codebase (which already uses VARCHAR).
   > 
   > **Tests:** `MetaDataMapperTest.insertWithStringNamespaceId` inserts a 
textual namespace id and round-trips it; 
`NamespacePluginRelMapperTest.testSelectByQueryWithStringNamespaceId` builds a 
relation with a string namespace and asserts the query returns it. Both 
exercise the previously-broken VARCHAR path.
   > 
   > ### Conclusion
   > Minimal, correct, and backed by tests that fail against the old TINYINT 
binding. Approving.
   
   Merge conflicts with master resolved (accepted both changes). No new logic 
introduced — the test method visible in this commit's diff was already part of 
this PR's original commits; it just shows up here due to how the merge diff is 
calculated against master. Please review again. Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to