Extracted BaseEntity.to_h to a Mapper method