mybatisplus 字段名注解
时间: 2023-09-05 09:14:34 浏览: 131
MyBatis-Plus 提供了一个注解 `@TableField` 来解决实体类的字段名与数据库中的字段名不匹配的问题。通过在实体类的字段上添加 `@TableField` 注解,并指定其 `value` 属性为数据库中对应的字段名,MyBatis-Plus 就能够正确地映射实体类与数据库表之间的字段关系。这样,即使实体类的字段名和数据库中的字段名不一致,也可以正常进行 CRUD 操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [mybatis-plus常用注解](https://blog.csdn.net/m0_61682705/article/details/125348601)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [MyBatis-Plus 常用注解](https://blog.csdn.net/m0_53067943/article/details/126061704)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文