Notes from discussion with Steve Ebersole: Conceptually in the JPA / ORM API, the "createQuery" method parameter shouldn't express the "from" but the output type of the query. For example with an HQL query, ORM will check at runtime that the actual expected return type of the query target is compatible with the type which the user requested. I agree with this view, which implies that we need to change our method. We should be able to return a Query<T> when the projection is specified as being T; with other kinds of projects, we might be able to suggest a return type Query<Object[]> In the short term we will just return "Query<Object>" - as it always essentially did since it wasn't parameterised - to be backwards compatible |