0
我有3个名为Employee,Office,Department的表。 员工有4个字段,如id,Emp_Name,Salary,JoiningDate。 办公室有3个字段,如ID,EMP_ID,位置 处有ID,Off_id,DEPT_NAME,EMP_ID使用Session.CreateCriteria休眠查询
SQL查询,
SELECT
DISTINCT TOP 10 this.id as Emp_id, Emp_Name,Salary,Location,Dept_name
FROM
Employee this
INNER JOIN
Office O ON this_id = O.id
INNER JOIN
Department d on d.Emp_id = this.id
ORDER BY this.id
能否请你帮我弄使用Session相当于Hibernate查询语言.CreateCriteria(Employee.class,“Employee”) 这可能会非常有帮助。