不规范的代价
@Transactional(readOnly=true)@SuppressWarnings("unchecked")public List<Branch> getChildrenByCateId(String cateId){String hql = "from Branch b where b.parentId = " + cateId ;Query query = branchDaoImpl.createQuery(hql);return query.getResultList();}String hql = "from Branch b where b.parentId = '" + cateId +"'" ;