Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【DB系列】Mybatis之ResultMap、ResultType返回结果使用姿势 | 一灰灰Blog #206

Open
liuyueyi opened this issue Jan 10, 2022 · 1 comment

Comments

@liuyueyi
Copy link
Owner

https://spring.hhui.top/spring-blog/2022/01/10/220110-Mybatis%E4%B9%8BResultMap%E3%80%81ResultType%E8%BF%94%E5%9B%9E%E7%BB%93%E6%9E%9C%E4%BD%BF%E7%94%A8%E5%A7%BF%E5%8A%BF/

在使用mybatis进行数据库操作时,如果希望将返回结果映射为项目中定义的实体对象Entity时,ResultMap与ResultType就很重要了;它们两的主要区别在于ResultType指定指定实体对象,ResultMap则定义数据库字段与实体的映射关系 接下来通过简单的实例来看一下这两种的使用姿势

@liuyueyi
Copy link
Owner Author

mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant