change HQL so that it will work in H2