Seller是已经hibernate映射类,如果我自定义一个类,是不是在new 后面要加上包名再加类名
回复:只要import入这个类就不用加包名再加类名了。
回复:只要import入这个类就不用加包名再加类名了。
2016-06-04
String hql="select o.customer.name,o.tradeDate,o.status,o.amount"
+ " from Order as o"
+ " where o.tradeDate<:endDate and o.tradeDate>=:beginDate "
+ " and o.status='已发货' or o.status='已付款' and o.amount>1000"
+ " order by status asc,tradeDate desc,amount desc";
+ " from Order as o"
+ " where o.tradeDate<:endDate and o.tradeDate>=:beginDate "
+ " and o.status='已发货' or o.status='已付款' and o.amount>1000"
+ " order by status asc,tradeDate desc,amount desc";
单元测试的时候会报错 javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
只要把<session-factory >中的name属性去掉就可以了
只要把<session-factory >中的name属性去掉就可以了
2016-05-27