应该当成条件来处理 或者 直接返回错误信息。 **环境信息** - 系统: Linux CentOS - JDK: 1.8.0_17 - 数据库: MySQL 5.7.14 - APIJSON: 4.7.0 **问题描述**  http://apijson.cn:8080/put { "Moment": { "id": 15, "praiseUserIdList<>": [ 1 ] }, "tag": "Moment", "@explain": true } **错误信息** 无 目前可以通过加 @combine 来解决。  { "Moment": { "id": 15, "content": "test", "praiseUserIdList<>": [ 82002 ], "@combine": "praiseUserIdList<>" }, "tag": "Moment", "@explain": true } 但最好还是在 AbstractObjectParser 中对 key 判断是否为不包含任何符合的 字段名。  ```java else if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false)) ``` 改为 ```java else if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false) && StringUtil.isName(key)) ``` https://github.com/Tencent/APIJSON/blob/0e06d1989a7a23de7115df5c9ab0a8166dd720ee/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java 类似问题: "userId>": 82002 转为了 userId = 82002    不能这么简单地判断 isWhere,而是在循环内判断 method != PUT || (StringUtil.isName(key) == false) https://github.com/Tencent/APIJSON/blob/0e06d1989a7a23de7115df5c9ab0a8166dd720ee/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Activity
TommyLemon commentedon Dec 2, 2021
感谢 @chenyanlann 修复了这个 bug 👍