pojo类:
@Table("TCommonCompany")
public class TCommonCompany implements Serializable{
private static final long serialVersionUID = 7907591253281099617L;
@Id
private Long id;
private String companyname;
private String status;
......
service类:
TCommonCompany obj = dao.fetch(TCommonCompany.class,commonCompanyId);
结果:
这个obj只有id一个字段有值,其它均为null,如果在这个companyname上加一个@Column("companyname")和@Column("status"),取出来就有值了,字段名和结果集名称一致,这个Column注解也是必须的吗?