always use read_attribute_for_serialization to serialize ids

this fixes #220