HI, Please tell me how to apply joins (right & left) in HQL query. My code is
session.createQuery( SELECT subjectManager.idsubject , subjectManager.firstname, subjectManager.middlename , subjectManager.lastname , lnManager.username , count(taskDataManager.id) as opentask , count(issueDataManager.id) as openissue from enrollment.server.DBConfig.LoginManager lnManager , enrollment.server.DBConfig.SubjectManager subjectManager left outer join fetch enrollment.server.DBConfig.TaskDataManager taskDataManager left outer join fetch enrollment.server.DBConfig.IssueDataManager issueDataManager WHERE subjectManager.idsubject = lnManager.idsubject and subjectManager.idsubject = taskDataManager.subjectByAssignedTo and subjectManager.idsubject = issueDataManager.subjectByAssignedTo and lnManager.isdeleted !=0 and taskDataManager.taskstatus = 1 group by subjectManager.idsubject ").iterate()
please tell me if there is any syntex error in above code. I m beginer in hibernate.
|