generate default equals method for all base classes