yangjj-iso commented on issue #6830:
URL: https://github.com/apache/shenyu/issues/6830#issuecomment-5267363191

   I have opened #6907 for this.
   
   I confirmed the reachability while working on it: `PUT 
/tag-relation/id/{id}` reaches `TagRelationController.updateTagRelation`, which 
calls `TagRelationServiceImpl.update`, and `TagRelationDO.buildTagRelationDO` 
always populates `apiId` from the DTO. So the `<if test="apiId != null">` 
branch fires on any update whose body carries an `apiId`, and the statement 
fails with `Column "NAME" not found` rather than performing the update.
   
   The PR changes `name` to `api_id` and adds a 
`testUpdateByPrimaryKeySelective` case to `TagRelationMapperTest`. That 
happened to be the only `TagRelationMapper` method the test class did not 
cover, which is probably why this went unnoticed. I also verified the new test 
fails with `BadSqlGrammar` when the mapper change is reverted, so it genuinely 
pins the defect.
   


-- 
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