Fix issue with Hibernate 3 compatibility

Issue: SWF-1637