@Transient的作用 :
用于注释pojo对象中的属性,被注释的属性将成为短暂的,不会持久化到数据库的“短暂”属性。
javaBean Log.java
@Transient
private String username;
//get...set methods.....
比如 select x1.*,x2.username from log x1, user x2
where x1.operatorcode = x2.usercode;
然后存的时候可以直接存在log的save对象,username不会跟着