Hi Radu, Thanks for paying attention! You're right, doesn't really make sense. Additionally, the result type can also be narrowed down to a QuerySelection<E, Long>. I'll create a JIRA ticket for it.
Cheers, Thomas On Thu, Jun 12, 2014 at 4:53 PM, Radu Creanga <rdc...@gmail.com> wrote: > Hi @all, > > I am just trying out the data module and it seems that the > CriteriaSupport#count() method is too restrictive on the attribute > parameter type. The current declaration is: > > <N extends Number> QuerySelection<E, N> count(SingularAttribute<E, N> > attribute); > > while it should probably be: > > <N extends Number> QuerySelection<E, N> count(SingularAttribute<E, ?> > attribute); > > That's because when using the Criteria API alone, there is no such > restriction to the attribute type. Could this be an oversight? > > Best regards, > Radu >