Maybe there are some ways to do it. I have not tried myself, but maybe this article is right about using createNativeQuery function:www.oracle.com/.../vasiliev-jpql.html