02.基本查询
package com.gordon.test;import java.text.DecimalFormat;import java.util.Arrays;import java.util.List;import org.hibernate.Session;import org.hibernate.Transaction;import org.junit.Test;import com.gordon.domain.Book;import com.gordon.utils.HibernateUtil;public class TestDemo1 { /** * 分组查询 * 查询结果: Hibernate: select publisher1_.name as col_0_0_, count(*) as col_1_0_ from t_book book0_, t_publisher publisher1_ where book0_.publisher_id=publisher1_.id group by book0_.publisher_id [电子工业出版社, 3] [北京大学出版社, 2] [人民邮电出版社, 2] */ @Test public void run5() { Session session = HibernateUtil.getCurrentSession(); Transaction transaction = session.beginTransaction(); List