Hibernate - Exception "node to traverse cannot be null"

Problem:

Hibernate exception "java.lang.IllegalArgumentException: node to traverse cannot be null"
Query query = session.createQuery("delete " +
"(...) " +
"where map_material.id > map_material_1.id " +
" and map_material.map_key = map_material_1.map_key " +
"(...) "

Solution:

Make sure to use hibernate "createSQLQuery" method
Query query = session.createSQLQuery("delete " +
"(...) " +
"where map_material.id > map_material_1.id " +
"and map_material.map_key = map_material_1.map_key " +
"(...) "

Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"