add hash code for entity