级联

1,查处级联。

 1     public Mchk findMchkOfFetch(String dwbh) throws DataAccessFailureException {
2 StringBuffer hql = new StringBuffer();
3 Map<String, Object> params = new HashMap<String, Object>();
4 hql.append("from Mchk mc left join fetch mc.mchkCredents mcs where 1 = 1");
5 if(!UtilHelper.isEmpty(dwbh)){
6 hql.append(" and mc.dwbh = :dwbh");
7 params.put("dwbh", dwbh);
8 }
9 return (Mchk) this.getSession().createQuery(hql.toString()).setProperties(params).uniqueResult();
10 }

 

posted @ 2011-12-25 17:54  csuwangwei  Views(241)  Comments(0Edit  收藏  举报