From 3ae309219339831c8faac41598c043018f8ff44f Mon Sep 17 00:00:00 2001 From: isea533 Date: Mon, 23 Nov 2015 22:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E7=82=B9=E5=BC=BA=E8=B0=83`@Transient`=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wiki/mapper3/3.Use.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wiki/mapper3/3.Use.md b/wiki/mapper3/3.Use.md index 7b98e43e3..1258c8130 100644 --- a/wiki/mapper3/3.Use.md +++ b/wiki/mapper3/3.Use.md @@ -48,6 +48,11 @@ public interface UserInfoMapper extends Mapper { 通过[使用Mapper专用的MyBatis生成器插件](http://git.oschina.net/free/Mapper/blob/master/wiki/mapper3/7.UseMBG.md)可以直接生成符合要求带注解的实体类。 +###重点强调`@Transient`注解 + +许多人由于不仔细看文档,频繁在这个问题上出错。 + +如果你的实体类中包含了不是数据库表中的字段,你需要给这个字段加上`@Transient`注解,这样通用Mapper在处理单表操作时就不会将标注的属性当成表字段处理!