This question has been discussed before, but I didn't find a conclusion about this. one of the
thread I read:
https://coderanch.com/t/159465/java-EJB-SCBCD/certification/HFEJB-Why-EJBQL-SELECT-Cant HFB P406, in the box it says: You can't use dot notation to return a CMR field e.g.
Director : Movie == 1 : Many
SELECT m.director FROM MovieSchema m
is invalid if 'director' is CMR field.
I got 2 Questions:
1.
If it is invalid, how can I return the component interface of the CMR field (director).
Is it "SELECT OBJECT(m.director) FROM MovieSchema m ?
2.
if I change the relationship to "Director : Movie == Many : Many"
How can I return a collection (component interface) of directors belong to one movie ?
Is it "SELECT OBJECT(m.directors) FROM MovieSchema m ?
or
"SELECT ds FROM MovieSchema m, IN (m.directors) ds ?
Thanks !!