implement hashcode on MappedClass