运用hql语句查询实体类指定字段自动封装成实体bean

在实体类中添加指定字段的构造方法 public class User { public User(String id, String name) { super(); this.id= id; this.name= name; } }在DAO层用hql语句查询 String hql = "Select new User(id, name) from User where nam
相关文章
相关标签/搜索