createCriteria(String associationPath)
引數說明:Session session = sessionFactory.openSession(); //獲取session物件 Criteria criteria = session.createCriteria(TbTopic.class); //範例化Criteria物件 criteria.createCriteria("tbType").add(Restrictions.eq("typeName","Java技術專區")); //呼叫createCriteria方法 List list = criteria.list(); //執行查詢