Hi, all. I am confusing the EJB-QL.
1. Function is:
public abstract Collection ejbSelectAllMovies() throws FinderException
QL is:
select OBJECT(m) FROM MovieSchema m WHERE m.genre = ?1
actually, in the method, there is NO any parameter, which one is parameter 1 ?
//-----------
2.
QL is
SELECT DISTINCT OBJECT (m) FROM MovieSchema m
Actually what I am confusing is "DINSTINCT". MovieSchema, a database with primary key, is IMPOSSIBLE to contain a same data in a row because of different primary key value.
so, it is resonable to change to this
SELECT DISTINCT m.title FROM MovieSchema m
if the m.title is not primary key.
Am I right?
//-------
Thanks.
Edward