只想问HQL怎么写才是正确的。求高手回答下。在数据库中类A类B是多对多关系class A{
private List<B> bs ;//B是另一个类
private String name;
private int id;
private int age;public A(int id ,String name ,int age,List<B> bs){
       this.id = id ;
       this.name = name;
       this.age = age;
       this.bs = bs;
}}在DAO层使用了hibernate框架public List findAll(final int currentPage,final int numberPerPage) {
                //我想问下HQL可以这样写么?
String hql = "select new(id,name,age,bs) from A";
                //我还有一种想法是这样写的  
                //是为了懒加载的时候将数据查出来直接把字段当作参数传进构造方法中
                String  hql = "select new(id,name,age,new list(bs)) from A";
List as = Pages.pageList(hql, hibernateTemplate, currentPage, numberPerPage);
return as;

}