How can I specify a single value finder query that selects the CMP with a max value?Select Object(o) from SampleEjb o where o.parameterId=?1 and o.date in (Select max(m.date) from SampleEjb m) is not allowed