Fixed issue with equals() during hibernate initialization