String hql="select o.customer, o.tradeDate, o.status, o.amount"
+ " from Order as o"
+ " where o.tradeDate between '2015-05-01'and '2015-06-01'"
+ " and o.status='已付款' or o.status='已发货'"
+ " and o.amount>1000"
+ " order by o.status asc, o.tradeDate desc, o.amount desc";
+ " from Order as o"
+ " where o.tradeDate between '2015-05-01'and '2015-06-01'"
+ " and o.status='已付款' or o.status='已发货'"
+ " and o.amount>1000"
+ " order by o.status asc, o.tradeDate desc, o.amount desc";
hibernate入门的老师说,主键生成方式常用的有native和assigned,结果只有他自己在用这两个,别的老师都用increment/(ㄒoㄒ)/~~
2017-05-04
session的关闭应该是HibernateSessionFactory.closeCurrentSession();
如果简单的写session.close(); 会报空指针异常
如果简单的写session.close(); 会报空指针异常
2017-05-04