This is not a bug. You need to tell Hibernate the query spaces to synchronize on. See org.hibernate.SQLQuery#addSynchronizedQuerySpace, etc. Or see the docs.