hql学习记录

`
String hql = "from SysUser o join o.set where owner_id = :newName";

    Query query = this.getCurrentSession().createQuery(hql);
    query.setParameter(0, userName);
     
    List<Object[]> list1 = query.list(); 
    Iterator it=list1.iterator();
    while(it.hasNext()){
     Object[] o=(Object[]) it.next();
     System.out.print(o[0]);
     System.out.println(o[1]);
    }
    `
posted @ 2017-11-09 16:16  comeluder  阅读(139)  评论(0编辑  收藏  举报