码迷,mamicode.com
首页 > 其他好文 > 详细

hql 中in 查询

时间:2016-08-02 22:34:46      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:hql 中in查询

public List<BLWasteType> findBLWasteType(List<BusinessLicense> listBL) {
        List<Long> list =new ArrayList<Long>();
        for(BusinessLicense bl :listBL){
            list.add(bl.getId());
        }
        String hql =" from BLWasteType where blid in (:blid)";
        Query query =this.createQuery(hql);
        query.setParameterList("blid", list);
        return query.list();
    }


本文出自 “猴子也疯狂” 博客,谢绝转载!

hql 中in 查询

标签:hql 中in查询

原文地址:http://1251769215.blog.51cto.com/11633863/1833608

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!