學(xué)習(xí)mysql老師說關(guān)鍵字要大寫,而學(xué)習(xí)HQL老師說要小寫。不過我一直都是小寫 這個方便自己看的舒服 大寫看著累
2017-10-12
String hql ="select new map(c.name as name,c.price as price,c.category as category,c.seller.name as sname) "
+ "from Commodity c "
+" where c.category like '%書%' and c.price>10 "
+"order by c.seller.name,c.price desc,c.name";
+ "from Commodity c "
+" where c.category like '%書%' and c.price>10 "
+"order by c.seller.name,c.price desc,c.name";
2017-10-10
String hql = "select new map(o.customer.name as name,o.tradeDate as date,o.status as status,o.amount as amount) "
+ "from Order o where o.tradeDate between '2015-01-01' and '2016-01-01' and o.amount>1000"
+ "and o.status in ('已發(fā)貨','已付款') order by o.status ,o.tradeDate desc,o.amount desc";
+ "from Order o where o.tradeDate between '2015-01-01' and '2016-01-01' and o.amount>1000"
+ "and o.status in ('已發(fā)貨','已付款') order by o.status ,o.tradeDate desc,o.amount desc";
2017-10-10
商家為什么沒有商品!不是one-many么
應(yīng)該是在商品有引用商家,many-one
應(yīng)該是在商品有引用商家,many-one
2017-10-04