(I know odds are against a response, but I figured I'd try anyways)
I have the following SQL query that I am attempting to convert to HQL. Unfortunately, outer joins have never been my favorite to deal with.
Code:
SELECT DISTINCT T_EMPLOYEE.SSN,
T_EMPLOYEE.TRANSACTION_ID,
T_EMPLOYEE.NAME,
T_EMPLOYEE.CANCEL_DATE,
T_EMPLOYEE.CAN_USERID,
T_DEPARTMENT.LOC FROM T_EMPLOYEE,
T_DEPARTMENT
WHERE ( T_EMPLOYEE.DEPARTMENT_CODE = T_DEPARTMENT.CODE (+)) and
( ( T_EMPLOYEE.SSN = :s_ssn ) )
I know the (+) symbol on the right of the where is Oracle's old style outer join sequence (and since it's on the right its a left outer join). There is also no foreign key relationship between T_EMPLOYEE and T_DEPARTMENT (legacy database). Right now I have two separate criteria queries (get the employee, then get the department).
Two questions:
1. Is a theta-style (i.e. using =) outer join possible in HQL without the foreign key relationship?
2. If so, can someone help me convert this to HQL?
Jason