I have two Entities
University
courses
Course
students
i want to access all the students in a university. I tried the following query
select u.courses.students from university u
i got the following exception.
org.hibernate.QueryException: illegal attempt to dereference collection [university0_.id.courses] with element property reference [students] [ select u.courses.students from com.socialsite.persistence.University u ]
at org.hibernate.hql.ast.tree.DotNode$1.buildIllegalCollectionDereferenceException(DotNode.java:46)
.....
can anyone explain what is wrong with this?