Query worked fine using Hibernate 4.2.10
Query borked using Hibernate 4.2.12
query in question:
delete from com.mrbear.Transactionrelation trel where trel.timeperiod = :TIMEPERIOD and trel.krlObject = :OBJECT and not exists ( select '' from com.mrbear.Taxationtransaction tatr where tatr.transactionrelation.transactionRelationNr = trel.transactionRelationNr )
The problem disappears when I rename :OBJECT to :KRLOBJECT.
It is possible that OBJECT is a keyword in HQL and not allowed to be used, but why then did it work in the previous version of Hibernate (4.2.10)?
I hope you can reproduce it.
Hibernate 4.2.12/Java 7/JBoss AS 7.1.3 Final
Oracle Database 11g Enterprise Edition Release 126.96.36.199.0 - 64bit Production