Hi 
       I am having problem in writing qry in hibernate i want to  left join programinstance with other tables . 
i have writen following qry in mysql . it is working . 
this is thw qry 
SELECT *
FROM users u
JOIN (
emaillogs e, contacts c
) ON ( u.usersId = e.usersId
AND c.usersId = u.usersId )
LEFT JOIN programinstance pi ON pi.programinstanceId = e.programinstanceId
ORDER BY `e`.`typeOfEmail` ASC 
when i write same qry in createQuery it is giving syntax error near  JOIN ( . un expected token " (" 
thanks 
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this: 
http://hibernate.org/42.html