Both JPQL and The Hibernate-specific HQL has some reserved keywords. As documented in the[ User Guide|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single/Hibernate_User_Guide.html#hql-collection-expressions], ELEMENTS has a meaning in HQL and cannot be used as a path identifier. This is just like you named your entity From or Select. The JPQL or HQL query will fail during parsing just like it fails for ELEMENTS. |