Aias00 opened a new issue, #6867:
URL: https://github.com/apache/shenyu/issues/6867

   ## Description
   The resultMap declares both `<id column="id" jdbcType="VARCHAR" 
property="id"/>` (line 22) and `<result column="id" jdbcType="BIGINT" 
property="id"/>` (line 23). The `operation_record_log.id` column is `bigint 
AUTO_INCREMENT` (schema) and `OperationRecordLog.id` is `Long`. The stray 
VARCHAR `<id>` is a copy-paste leftover. MyBatis applies both mappings to the 
same property; the VARCHAR `<id>` declaration can interfere with 
identity/equality handling and is simply wrong. `selectLimit` (line 46) uses 
`resultMap="BaseResultMap"`, reachable from `OperationRecordLogServiceImpl`.
   
   ## Location
   - 
`shenyu-admin/src/main/resources/mappers/operation-record-log-sqlmap.xml:22-23`
   
   ## Impact
   Incorrect jdbcType on the identity column; potential misbinding on strict 
drivers and a maintenance hazard. Functionally masked today because the BIGINT 
mapping wins on java-type resolution, but the duplicate is a real defect.
   
   ## Suggested fix
   Remove line 22 (the VARCHAR `<id>`), keeping the BIGINT `<result>`.
   
   ## Related existing
   None — `operation_record_log` mapper was not covered beyond the "unbounded 
scan" perf item.
   


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