标签:
String sql="select gc.* from eportal_goods_category gc "+
" inner JOIN "+
" eportal_goods g on gc.id=g.goods_category_id "+
" INNER JOIN "+
" eportal_seller se on g.supplier_id=se.id "+
" where se.id=‘"+id+"‘ GROUP BY gc.`name`";
SQLQuery list = getSession().createSQLQuery(sql);
List<GoodsCategory> lgs=list.addEntity(GoodsCategory.class).list();
标签:
原文地址:http://my.oschina.net/jiefalcon/blog/376465