I have two tables Course, and Subject both are in many to many relationship.
The Third table is Course_Subject.
I have to perform join
to fetch all Courses.
I tried to join the Tables like:
hqlQuery="FROM Course c inner join fetch c.Course_Subject as s where c.id=s.courseId and s.subjectId=:subjectId";
but it is showing NullpointerException
.
Please suggest me.