Hi Sudhir,
of course you are rigth but I was thinking in the context of the current
thread.
So the question is : Why this EJB-QL is wrong
SELECT s.name FROM Student s, Program p where s.subjectid=p.subjectId
and the spec says on p.232
Because finder methods cannot return arbitrary types, the SELECT clause of an EJB QL query defined
for a finder method must always correspond to the abstract schema type of the entity bean for which the
finder method is defined.
and later on
In contrast, the SELECT clause of a query defined for a select method can
return the abstract schema types of other entity beans or the values of cmp-fields.
The given EJB-QL states that the method is select method (because of the return type), so it appeared that this EJB-QL is right.