| Just a note so this can be found more easily: JPQL 'select count( distinct e ) from entity e' will lead to ORA-00909: invalid number of arguments if e carries an embedded ID (@EmbeddedId). Concerning the fix: wouldn't it be appropriate to generally count table.rowid when counting rows on Oracle DBMS? That is, if the argument to jpql count() is an identification variable, distinct or not. |