第二題:
String hql="select new list(o.customer.name,o.tradeDate,o.status,o.amount) from Order o "
+"where o.tradeDate between '2015-05-01' and '2015-06-01' and o.status in('已發(fā)貨','已付款') and o.amount>1000 "
+"order by o.status asc,o.tradeDate desc,o.amount desc";
String hql="select new list(o.customer.name,o.tradeDate,o.status,o.amount) from Order o "
+"where o.tradeDate between '2015-05-01' and '2015-06-01' and o.status in('已發(fā)貨','已付款') and o.amount>1000 "
+"order by o.status asc,o.tradeDate desc,o.amount desc";
2018-11-14
第一題:
String hql = "select new list(c.name,c.price,c.seller.name,c.category) from Commodity c "
+"where c.category like '%書%' and c.price>=10 "
+"order by c.seller.name asc,c.price desc,c.name asc ";
String hql = "select new list(c.name,c.price,c.seller.name,c.category) from Commodity c "
+"where c.category like '%書%' and c.price>=10 "
+"order by c.seller.name asc,c.price desc,c.name asc ";
2018-11-14
是org.hibernate.query.Query;不是org.hibernate.Query
2018-05-02