merge new mapping with the existing one on save

- there was a bug where the mapping would be overwritten when objects of the same type have different attributes.