Generate a HQL query from a RESTful path