Core-1973 changed hql query