while running a named query in hibernate-5 how would I make sure that it is using JPA2.1 standards(JPQL Grammer)
When running in hibernate5 it executes fine, this should fail when in JPA2.1, what/where do I need set something to use the JPA standard(JPQL Grammar).
String queryString = "from DeptEmployee where employeeNumber = :employeeNo";
Query jpaQuery = entityManager.createQuery(queryString);
this should throw an exception (for not having a "select" keyword according) when running against JPQL grammar in Hibernate-5 but should run fine without setting JPQL grammar.
I want to run using Hibernate5 engine but still want to keep the JPA implementation. btw I tried this property 'hibernate.query.jpaql_strict_compliance= true'
,
this didn't work.
ref: http://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/cfg/AvailableSettings.html#JPAQL_STRICT_COMPLIANCE