Skip to content

Commit

Permalink
更新文档,重点强调@Transient注解
Browse files Browse the repository at this point in the history
  • Loading branch information
abel533 committed Nov 23, 2015
1 parent 976d4a2 commit 3ae3092
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wiki/mapper3/3.Use.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public interface UserInfoMapper extends Mapper<UserInfo> {

通过[使用Mapper专用的MyBatis生成器插件](http://git.oschina.net/free/Mapper/blob/master/wiki/mapper3/7.UseMBG.md)可以直接生成符合要求带注解的实体类。

###重点强调`@Transient`注解

许多人由于不仔细看文档,频繁在这个问题上出错。

如果你的实体类中包含了不是数据库表中的字段,你需要给这个字段加上`@Transient`注解,这样通用Mapper在处理单表操作时就不会将标注的属性当成表字段处理!
<br><br><br><br>

<br><br><br><br>
Expand Down

0 comments on commit 3ae3092

Please sign in to comment.