Fixing Hibernate error

Done for [AGPUSH-273](https://issues.jboss.org/browse/AGPUSH-273) 

Details are described in the above JIRA